mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 07:04:45 +00:00
AgentInterface sets default streamFn and getApiKey
- Make Agent.streamFn and Agent.getApiKey public - AgentInterface sets defaults if not already set - Example no longer needs to configure these
This commit is contained in:
parent
92898f486b
commit
4d1936d3df
3 changed files with 21 additions and 14 deletions
|
|
@ -82,8 +82,8 @@ export class Agent {
|
|||
private transformContext?: (messages: AgentMessage[], signal?: AbortSignal) => Promise<AgentMessage[]>;
|
||||
private messageQueue: AgentMessage[] = [];
|
||||
private queueMode: "all" | "one-at-a-time";
|
||||
private streamFn: StreamFn;
|
||||
private getApiKey?: (provider: string) => Promise<string | undefined> | string | undefined;
|
||||
public streamFn: StreamFn;
|
||||
public getApiKey?: (provider: string) => Promise<string | undefined> | string | undefined;
|
||||
private runningPrompt?: Promise<void>;
|
||||
private resolveRunningPrompt?: () => void;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue