mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 21:03:19 +00:00
Allow async streamFn for dynamic proxy settings
- StreamFn type now allows returning Promise - agent-loop awaits streamFn result - createStreamFn takes getProxyUrl callback, reads settings on each call
This commit is contained in:
parent
e0be2e650d
commit
92898f486b
4 changed files with 16 additions and 11 deletions
|
|
@ -211,7 +211,7 @@ async function streamAssistantResponse(
|
|||
const resolvedApiKey =
|
||||
(config.getApiKey ? await config.getApiKey(config.model.provider) : undefined) || config.apiKey;
|
||||
|
||||
const response = streamFunction(config.model, llmContext, {
|
||||
const response = await streamFunction(config.model, llmContext, {
|
||||
...config,
|
||||
apiKey: resolvedApiKey,
|
||||
signal,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue