npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@taca-app/chat-sdk

v1.0.3

Published

Taca AI Chat SDK

Readme

Taca Chat SDK

TypeScript npm version License: MIT Node.js ESM

Getting Started

Installation

npm install @taca-app/chat-sdk
# or
pnpm add @taca-app/chat-sdk
# or
yarn add @taca-app/chat-sdk

Setup

Create a client with your API key. You can optionally specify a custom baseUrl (defaults to http://localhost:3000/api/v1/chat):

import { TacaAI } from "@taca-app/chat-sdk";

const client = new HayleeAI({
    baseUrl: "http://localhost:3000/api/v1/chat", // optional
});

Basic Usage

Stream a message with optional conversation history:

await client.messages.stream(
  {
    message: "What are my latest spendings?",
    conversation_history: [
      { role: "human", content: "Hello" },
      { role: "ai", content: "Hi! How can I help with tracking your expenses?" },
    ],
  },
  {
    onLlmToken: (ev) => {
      const text = ev.content?.[0]?.text ?? "";
      if (text) process.stdout.write(text);
    },
    onSearchUpdate: (ev) => {
      console.log("Search:", ev.content?.query, ev.status);
    },
    onError: (err) => {
      console.error("Stream error:", err);
    },
    signal: abortController.signal, 
  }
);

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk v1.0.0

Enumerations

Classes

Interfaces

Type Aliases

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / AuthenticationError

Class: AuthenticationError

Defined in: src/errors/authentication.error.ts:3

Extends

Constructors

Constructor

new AuthenticationError(message): AuthenticationError

Defined in: src/errors/authentication.error.ts:6

Parameters

message

string

Returns

AuthenticationError

Overrides

TacaAIError.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

TacaAIError.cause


message

message: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

TacaAIError.message


name

readonly name: string = "AuthenticationError"

Defined in: src/errors/authentication.error.ts:4

Overrides

TacaAIError.name


stack?

optional stack: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

TacaAIError.stack


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

Inherited from

TacaAIError.stackTraceLimit

Methods

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();

Parameters

targetObject

object

constructorOpt?

Function

Returns

void

Inherited from

TacaAIError.captureStackTrace


prepareStackTrace()

static prepareStackTrace(err, stackTraces): any

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:56

Parameters

err

Error

stackTraces

CallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

TacaAIError.prepareStackTrace

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / AuthorizationError

Class: AuthorizationError

Defined in: src/errors/authorization.error.ts:3

Extends

Constructors

Constructor

new AuthorizationError(message): AuthorizationError

Defined in: src/errors/authorization.error.ts:6

Parameters

message

string

Returns

AuthorizationError

Overrides

TacaAIError.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

TacaAIError.cause


message

message: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

TacaAIError.message


name

readonly name: string = "AuthorizationError"

Defined in: src/errors/authorization.error.ts:4

Overrides

TacaAIError.name


stack?

optional stack: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

TacaAIError.stack


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

Inherited from

TacaAIError.stackTraceLimit

Methods

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();

Parameters

targetObject

object

constructorOpt?

Function

Returns

void

Inherited from

TacaAIError.captureStackTrace


prepareStackTrace()

static prepareStackTrace(err, stackTraces): any

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:56

Parameters

err

Error

stackTraces

CallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

TacaAIError.prepareStackTrace

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / BaseEvent

Class: BaseEvent

Defined in: src/messages/types.ts:13

Base event for Streaming BaseEvent

Extended by

Constructors

Constructor

new BaseEvent(): BaseEvent

Returns

BaseEvent

Properties

kind

kind: EventKind

Defined in: src/messages/types.ts:17

Used to separate streams


node

node: string

Defined in: src/messages/types.ts:21

Source node in langgraph

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / ConversationInfoContent

Class: ConversationInfoContent

Defined in: src/messages/types.ts:55

Constructors

Constructor

new ConversationInfoContent(): ConversationInfoContent

Returns

ConversationInfoContent

Properties

subject

subject: string

Defined in: src/messages/types.ts:57


type

type: "created" | "updated" | "deleted" | "error"

Defined in: src/messages/types.ts:56

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / ConversationInfoEvent

Class: ConversationInfoEvent

Defined in: src/messages/types.ts:51

Base event for Streaming BaseEvent

Extends

Constructors

Constructor

new ConversationInfoEvent(): ConversationInfoEvent

Returns

ConversationInfoEvent

Inherited from

BaseEvent.constructor

Properties

content

content: ConversationInfoContent

Defined in: src/messages/types.ts:52


kind

kind: EventKind

Defined in: src/messages/types.ts:17

Used to separate streams

Inherited from

BaseEvent.kind


node

node: string

Defined in: src/messages/types.ts:21

Inherited from

BaseEvent.node

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / EndEvent

Class: EndEvent

Defined in: src/messages/types.ts:62

Constructors

Constructor

new EndEvent(): EndEvent

Returns

EndEvent

Properties

success

success: boolean

Defined in: src/messages/types.ts:63

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / LlmTokenContent

Class: LlmTokenContent

Defined in: src/messages/types.ts:28

LLmTokenContent

Constructors

Constructor

new LlmTokenContent(): LlmTokenContent

Returns

LlmTokenContent

Properties

text

text: string

Defined in: src/messages/types.ts:36


type

type: "text"

Defined in: src/messages/types.ts:32

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / LlmTokenEvent

Class: LlmTokenEvent

Defined in: src/messages/types.ts:39

Base event for Streaming BaseEvent

Extends

Constructors

Constructor

new LlmTokenEvent(): LlmTokenEvent

Returns

LlmTokenEvent

Inherited from

BaseEvent.constructor

Properties

content

content: LlmTokenContent[]

Defined in: src/messages/types.ts:43


kind

kind: EventKind

Defined in: src/messages/types.ts:17

Used to separate streams

Inherited from

BaseEvent.kind


model

model: string

Defined in: src/messages/types.ts:47


node

node: string

Defined in: src/messages/types.ts:21

Inherited from

BaseEvent.node

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / MessageService

Class: MessageService

Defined in: src/messages/message.service.ts:59

Constructors

Constructor

new MessageService(client): MessageService

Defined in: src/messages/message.service.ts:61

Parameters

client

TacaAIClient

Returns

MessageService

Methods

stream()

stream(payload, options?): Promise<void>

Defined in: src/messages/message.service.ts:67

Parameters

payload

CreateMessageDto

The create message payload

options?

MessageServiceOptions

Config for streaming

Returns

Promise<void>

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / NotFoundError

Class: NotFoundError

Defined in: src/errors/not-found.error.ts:3

Extends

Constructors

Constructor

new NotFoundError(message): NotFoundError

Defined in: src/errors/not-found.error.ts:6

Parameters

message

string

Returns

NotFoundError

Overrides

TacaAIError.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

TacaAIError.cause


message

message: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

TacaAIError.message


name

readonly name: string = "NotFoundError"

Defined in: src/errors/not-found.error.ts:4

Overrides

TacaAIError.name


stack?

optional stack: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

TacaAIError.stack


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

Inherited from

TacaAIError.stackTraceLimit

Methods

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();

Parameters

targetObject

object

constructorOpt?

Function

Returns

void

Inherited from

TacaAIError.captureStackTrace


prepareStackTrace()

static prepareStackTrace(err, stackTraces): any

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:56

Parameters

err

Error

stackTraces

CallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

TacaAIError.prepareStackTrace

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / TacaAI

Class: TacaAI

Defined in: src/index.ts:7

Instantiate a new TacaAI connection

Extends

Constructors

Constructor

new TacaAI(options): TacaAI

Defined in: src/index.ts:13

Parameters

options

TacaAIChatClientOptions

TacaAIChatClientOptions

Returns

TacaAI

Overrides

TacaAIClient.constructor

Properties

messages

messages: MessageService

Defined in: src/index.ts:8

Methods

_stream()

_stream(payload, signal?): AsyncGenerator<string>

Defined in: src/_internal/client.ts:37

Internal SSE stream using XMLHttpRequest. XHR onprogress is universally supported in React Native (Hermes) and browsers, unlike fetch + ReadableStream which is not available in RN's fetch polyfill.

Parameters

payload

CreateMessageDto

Message DTO

signal?

AbortSignal

Optional AbortSignal

Returns

AsyncGenerator<string>

Inherited from

TacaAIClient._stream

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / TacaAIClient

Class: TacaAIClient

Defined in: src/_internal/client.ts:17

Internal TacaAI Client. Do not use unless necessary. TacaAIClient

Extended by

Constructors

Constructor

new TacaAIClient(options): TacaAIClient

Defined in: src/_internal/client.ts:21

Parameters

options

TacaAIChatClientOptions

Returns

TacaAIClient

Methods

_stream()

_stream(payload, signal?): AsyncGenerator<string>

Defined in: src/_internal/client.ts:37

Internal SSE stream using XMLHttpRequest. XHR onprogress is universally supported in React Native (Hermes) and browsers, unlike fetch + ReadableStream which is not available in RN's fetch polyfill.

Parameters

payload

CreateMessageDto

Message DTO

signal?

AbortSignal

Optional AbortSignal

Returns

AsyncGenerator<string>

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / TacaAIError

Class: TacaAIError

Defined in: src/errors/base.ts:1

Extends

  • Error

Extended by

Constructors

Constructor

new TacaAIError(message): TacaAIError

Defined in: src/errors/base.ts:4

Parameters

message

string

Returns

TacaAIError

Overrides

Error.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

Error.cause


message

message: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

Error.message


name

readonly name: string = "TacaAIError"

Defined in: src/errors/base.ts:2

Overrides

Error.name


stack?

optional stack: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

Error.stack


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

Inherited from

Error.stackTraceLimit

Methods

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();

Parameters

targetObject

object

constructorOpt?

Function

Returns

void

Inherited from

Error.captureStackTrace


prepareStackTrace()

static prepareStackTrace(err, stackTraces): any

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:56

Parameters

err

Error

stackTraces

CallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

Error.prepareStackTrace

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / ValidationError

Class: ValidationError

Defined in: src/errors/validation.error.ts:3

Extends

Constructors

Constructor

new ValidationError(message, details?): ValidationError

Defined in: src/errors/validation.error.ts:5

Parameters

message

string

details?

any

Returns

ValidationError

Overrides

TacaAIError.constructor

Properties

cause?

optional cause: unknown

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26

Inherited from

TacaAIError.cause


details?

optional details: any

Defined in: src/errors/validation.error.ts:5


message

message: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077

Inherited from

TacaAIError.message


name

readonly name: string = "ValidationError"

Defined in: src/errors/validation.error.ts:4

Overrides

TacaAIError.name


stack?

optional stack: string

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078

Inherited from

TacaAIError.stack


stackTraceLimit

static stackTraceLimit: number

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:68

The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)).

The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed.

If set to a non-number value, or set to a negative number, stack traces will not capture any frames.

Inherited from

TacaAIError.stackTraceLimit

Methods

captureStackTrace()

static captureStackTrace(targetObject, constructorOpt?): void

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:52

Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called.

const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack;  // Similar to `new Error().stack`

The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}.

The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace.

The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance:

function a() {
  b();
}

function b() {
  c();
}

function c() {
  // Create an error without stack trace to avoid calculating the stack trace twice.
  const { stackTraceLimit } = Error;
  Error.stackTraceLimit = 0;
  const error = new Error();
  Error.stackTraceLimit = stackTraceLimit;

  // Capture the stack trace above function b
  Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
  throw error;
}

a();

Parameters

targetObject

object

constructorOpt?

Function

Returns

void

Inherited from

TacaAIError.captureStackTrace


prepareStackTrace()

static prepareStackTrace(err, stackTraces): any

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@types/node/globals.d.ts:56

Parameters

err

Error

stackTraces

CallSite[]

Returns

any

See

https://v8.dev/docs/stack-trace-api#customizing-stack-traces

Inherited from

TacaAIError.prepareStackTrace

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / EventKind

Enumeration: EventKind

Defined in: src/messages/types.ts:1

Enumeration Members

CONVERSATION_INFO

CONVERSATION_INFO: "conversation_info"

Defined in: src/messages/types.ts:4


LLM_TOKEN

LLM_TOKEN: "llm_token"

Defined in: src/messages/types.ts:2


TOOLS

TOOLS: "tools"

Defined in: src/messages/types.ts:3

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / Role

Enumeration: Role

Defined in: src/types/chat.interface.ts:14

Role - Role of message

Enumeration Members

AI

AI: "ai"

Defined in: src/types/chat.interface.ts:16


HUMAN

HUMAN: "human"

Defined in: src/types/chat.interface.ts:15

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / ToolStatus

Enumeration: ToolStatus

Defined in: src/messages/types.ts:75

Enumeration Members

END

END: "END"

Defined in: src/messages/types.ts:77


ERROR

ERROR: "ERROR"

Defined in: src/messages/types.ts:78


START

START: "START"

Defined in: src/messages/types.ts:76

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / CreateMessageDto

Interface: CreateMessageDto

Defined in: src/types/chat.interface.ts:6

DTO for creating a message

Properties

conversation_id?

optional conversation_id: string

Defined in: src/types/chat.interface.ts:8

Optional existing conversation ID


message

message: string

Defined in: src/types/chat.interface.ts:7

User message

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / MessageServiceOptions

Interface: MessageServiceOptions

Defined in: src/messages/message.service.ts:12

Properties

signal?

optional signal: AbortSignal

Defined in: src/messages/message.service.ts:56

AbortSignal for terminating the upstream stream

Methods

onConversationCreated()?

optional onConversationCreated(ev): void

Defined in: src/messages/message.service.ts:42

Streams on async conversation creation.

Parameters

ev

ConversationInfoEvent

ConversationInfoEvent

Returns

void


onConversationFailed()?

optional onConversationFailed(ev): void

Defined in: src/messages/message.service.ts:47

Streams on async conversation creation failure.

Parameters

ev

ConversationInfoEvent

ConversationInfoEvent

Returns

void


onEnd()?

optional onEnd(ev): void

Defined in: src/messages/message.service.ts:22

triggers upon stream end

Parameters

ev

EndEvent

EndEvent

Returns

void


onError()?

optional onError(err): void

Defined in: src/messages/message.service.ts:52

Streams errors on runtime

Parameters

err

unknown

Returns

void


onLlmToken()?

optional onLlmToken(ev): void

Defined in: src/messages/message.service.ts:17

Streams llm tokens for output

Parameters

ev

LlmTokenEvent

Returns

void


onToolEnd()?

optional onToolEnd(ev): void

Defined in: src/messages/message.service.ts:32

Streams tool end updates

Parameters

ev

ToolEvent

ToolEvent

Returns

void


onToolError()?

optional onToolError(ev): void

Defined in: src/messages/message.service.ts:37

Streams tool errors

Parameters

ev

ToolEvent

ToolEvent

Returns

void


onToolStart()?

optional onToolStart(ev): void

Defined in: src/messages/message.service.ts:27

Streams tool start updates

Parameters

ev

ToolEvent

ToolEvent

Returns

void

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / ToolContent

Interface: ToolContent

Defined in: src/messages/types.ts:81

Properties

params

params: unknown

Defined in: src/messages/types.ts:82

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / ToolEvent

Interface: ToolEvent

Defined in: src/messages/types.ts:66

Base event for Streaming BaseEvent

Extends

Properties

content?

optional content: ToolContent

Defined in: src/messages/types.ts:67


error?

optional error: unknown

Defined in: src/messages/types.ts:72


kind

kind: EventKind

Defined in: src/messages/types.ts:17

Used to separate streams

Inherited from

BaseEvent.kind


name

name: string

Defined in: src/messages/types.ts:68


node

node: string

Defined in: src/messages/types.ts:21

Inherited from

BaseEvent.node


results

results: ToolResultContent[]

Defined in: src/messages/types.ts:71


status

status: ToolStatus

Defined in: src/messages/types.ts:70


tool_call_id?

optional tool_call_id: string

Defined in: src/messages/types.ts:69

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / ToolResultContent

Interface: ToolResultContent

Defined in: src/messages/types.ts:85

Properties

content

content: any

Defined in: src/messages/types.ts:89


type

type: string

Defined in: src/messages/types.ts:87

@taca-app/chat-sdk v1.0.0


@taca-app/chat-sdk / TacaAIChatClientOptions

Type Alias: TacaAIChatClientOptions

TacaAIChatClientOptions = object

Defined in: src/_internal/client.ts:8

Options for the TacaAI Client

Properties

baseUrl?

optional baseUrl: string

Defined in: src/_internal/client.ts:9

Optional base URL, defaults to localhost


token

token: string | () => string | Promise<string>

Defined in: src/_internal/client.ts:10

Bearer token or an async function that returns one (useful for refreshable tokens)