Skip to content

Commit

Permalink
fix: type definition issues on agent schema
Browse files Browse the repository at this point in the history
  • Loading branch information
naomi-lgbt committed Feb 6, 2025
1 parent 5d7cbae commit 08e0ea5
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/lib/types/AgentLiveSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,24 +99,24 @@ type ThinkModel =
type: "open_ai";
};
model: "gpt-4o-mini";
instructions: string;
functions: ThinkModelFunction[];
instructions?: string;
functions?: ThinkModelFunction[];
}
| {
provider: {
type: "anthropic";
};
model: "claude-3-haiku-20240307";
instructions: string;
functions: ThinkModelFunction[];
instructions?: string;
functions?: ThinkModelFunction[];
}
| {
provider: {
type: "groq";
};
model: "";
instructions: string;
functions: ThinkModelFunction[];
instructions?: string;
functions?: ThinkModelFunction[];
}
| {
provider: {
Expand All @@ -125,8 +125,8 @@ type ThinkModel =
key: string;
};
model: string;
instructions: string;
functions: ThinkModelFunction[];
instructions?: string;
functions?: ThinkModelFunction[];
};

/**
Expand All @@ -138,12 +138,12 @@ interface AgentLiveSchema extends Record<string, unknown> {
/**
* @default 1
*/
channels: number;
channels?: number;
encoding: AudioEncoding;
/**
* @default false
*/
multichannel: boolean;
multichannel?: boolean;
sampleRate: number;
};
/**
Expand All @@ -169,11 +169,11 @@ interface AgentLiveSchema extends Record<string, unknown> {
*/
think: ThinkModel;
};
context: {
context?: {
/**
* LLM message history (e.g. to restore existing conversation if websocket disconnects)
*/
messages: [];
messages: { type: "user" | "assistant"; content: string }[];
/**
* Whether to replay the last message, if it is an assistant message.
*/
Expand Down

0 comments on commit 08e0ea5

Please sign in to comment.