@sagentic-ai/sagentic-af / ClientMux
ClientMux ​
ClientMux is a multiplexer for clients of multiple OpenAI models.
Param ​
OpenAI API Key
Param ​
ClientOptions
Constructors ​
new ClientMux(openAIKey, options) ​
ts
new ClientMux(openAIKey, options?): ClientMux
Parameters ​
• openAIKey: string
• options?: ClientMuxOptions
Returns ​
Source ​
Properties ​
clients ​
ts
private clients: Record<ModelType, Client>;
Source ​
Methods ​
createChatCompletion() ​
ts
createChatCompletion(request): Promise<ChatCompletion>
Parameters ​
• request: ChatCompletionCreateParamsNonStreaming
Returns ​
Promise
<ChatCompletion
>
Source ​
start() ​
ts
start(): void
Returns ​
void
Source ​
stop() ​
ts
stop(): void
Returns ​
void