@taca-app/chat-sdk
v1.0.3
Published
Taca AI Chat SDK
Readme
Taca Chat SDK
Getting Started
Installation
npm install @taca-app/chat-sdk
# or
pnpm add @taca-app/chat-sdk
# or
yarn add @taca-app/chat-sdkSetup
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
- AuthenticationError
- AuthorizationError
- BaseEvent
- ConversationInfoContent
- ConversationInfoEvent
- EndEvent
- LlmTokenContent
- LlmTokenEvent
- MessageService
- NotFoundError
- TacaAI
- TacaAIClient
- TacaAIError
- ValidationError
Interfaces
Type Aliases
@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
Properties
cause?
optionalcause:unknown
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
readonlyname:string="AuthenticationError"
Defined in: src/errors/authentication.error.ts:4
Overrides
stack?
optionalstack:string
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
stackTraceLimit
staticstackTraceLimit: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
Methods
captureStackTrace()
staticcaptureStackTrace(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
prepareStackTrace()
staticprepareStackTrace(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
@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
Properties
cause?
optionalcause:unknown
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
readonlyname:string="AuthorizationError"
Defined in: src/errors/authorization.error.ts:4
Overrides
stack?
optionalstack:string
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
stackTraceLimit
staticstackTraceLimit: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
Methods
captureStackTrace()
staticcaptureStackTrace(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
prepareStackTrace()
staticprepareStackTrace(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
@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 / 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 / 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
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
node
node:
string
Defined in: src/messages/types.ts:21
Inherited from
@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 / 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 / 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
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
model
model:
string
Defined in: src/messages/types.ts:47
node
node:
string
Defined in: src/messages/types.ts:21
Inherited from
@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
Returns
MessageService
Methods
stream()
stream(
payload,options?):Promise<void>
Defined in: src/messages/message.service.ts:67
Parameters
payload
The create message payload
options?
Config for streaming
Returns
Promise<void>
@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
Properties
cause?
optionalcause:unknown
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
message
message:
string
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
name
readonlyname:string="NotFoundError"
Defined in: src/errors/not-found.error.ts:4
Overrides
stack?
optionalstack:string
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
stackTraceLimit
staticstackTraceLimit: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
Methods
captureStackTrace()
staticcaptureStackTrace(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
prepareStackTrace()
staticprepareStackTrace(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
@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
Returns
TacaAI
Overrides
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
Message DTO
signal?
AbortSignal
Optional AbortSignal
Returns
AsyncGenerator<string>
Inherited from
@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
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
Message DTO
signal?
AbortSignal
Optional AbortSignal
Returns
AsyncGenerator<string>
@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?
optionalcause: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
readonlyname:string="TacaAIError"
Defined in: src/errors/base.ts:2
Overrides
Error.name
stack?
optionalstack:string
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Error.stack
stackTraceLimit
staticstackTraceLimit: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()
staticcaptureStackTrace(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()
staticprepareStackTrace(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 / 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
Properties
cause?
optionalcause:unknown
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
details?
optionaldetails: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
name
readonlyname:string="ValidationError"
Defined in: src/errors/validation.error.ts:4
Overrides
stack?
optionalstack:string
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
stackTraceLimit
staticstackTraceLimit: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
Methods
captureStackTrace()
staticcaptureStackTrace(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
prepareStackTrace()
staticprepareStackTrace(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
@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 / 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 / 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 / CreateMessageDto
Interface: CreateMessageDto
Defined in: src/types/chat.interface.ts:6
DTO for creating a message
Properties
conversation_id?
optionalconversation_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 / MessageServiceOptions
Interface: MessageServiceOptions
Defined in: src/messages/message.service.ts:12
Properties
signal?
optionalsignal:AbortSignal
Defined in: src/messages/message.service.ts:56
AbortSignal for terminating the upstream stream
Methods
onConversationCreated()?
optionalonConversationCreated(ev):void
Defined in: src/messages/message.service.ts:42
Streams on async conversation creation.
Parameters
ev
ConversationInfoEvent
Returns
void
onConversationFailed()?
optionalonConversationFailed(ev):void
Defined in: src/messages/message.service.ts:47
Streams on async conversation creation failure.
Parameters
ev
ConversationInfoEvent
Returns
void
onEnd()?
optionalonEnd(ev):void
Defined in: src/messages/message.service.ts:22
triggers upon stream end
Parameters
ev
EndEvent
Returns
void
onError()?
optionalonError(err):void
Defined in: src/messages/message.service.ts:52
Streams errors on runtime
Parameters
err
unknown
Returns
void
onLlmToken()?
optionalonLlmToken(ev):void
Defined in: src/messages/message.service.ts:17
Streams llm tokens for output
Parameters
ev
Returns
void
onToolEnd()?
optionalonToolEnd(ev):void
Defined in: src/messages/message.service.ts:32
Streams tool end updates
Parameters
ev
ToolEvent
Returns
void
onToolError()?
optionalonToolError(ev):void
Defined in: src/messages/message.service.ts:37
Streams tool errors
Parameters
ev
ToolEvent
Returns
void
onToolStart()?
optionalonToolStart(ev):void
Defined in: src/messages/message.service.ts:27
Streams tool start updates
Parameters
ev
ToolEvent
Returns
void
@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 / ToolEvent
Interface: ToolEvent
Defined in: src/messages/types.ts:66
Base event for Streaming BaseEvent
Extends
Properties
content?
optionalcontent:ToolContent
Defined in: src/messages/types.ts:67
error?
optionalerror:unknown
Defined in: src/messages/types.ts:72
kind
kind:
EventKind
Defined in: src/messages/types.ts:17
Used to separate streams
Inherited from
name
name:
string
Defined in: src/messages/types.ts:68
node
node:
string
Defined in: src/messages/types.ts:21
Inherited from
results
results:
ToolResultContent[]
Defined in: src/messages/types.ts:71
status
status:
ToolStatus
Defined in: src/messages/types.ts:70
tool_call_id?
optionaltool_call_id:string
Defined in: src/messages/types.ts:69
@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 / TacaAIChatClientOptions
Type Alias: TacaAIChatClientOptions
TacaAIChatClientOptions =
object
Defined in: src/_internal/client.ts:8
Options for the TacaAI Client
Properties
baseUrl?
optionalbaseUrl: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)
