diff options
| author | sigoden <sigoden@gmail.com> | 2024-12-07 18:51:38 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-07 18:51:38 +0800 |
| commit | ccbc340f6bd783bb54e90d9139ab0e41ea0c33c3 (patch) | |
| tree | 74648d484189a2c4ae62327ea345229911bdaa4c /src | |
| parent | af4ff7afe9c8268a62d31aa3ede59fbc81d6e946 (diff) | |
| download | aichat-ccbc340f6bd783bb54e90d9139ab0e41ea0c33c3.tar.gz | |
refactor: several improvements (#1044)
- update models.yaml
- update azure openai api version
- agent `run_instructions_fn`
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/azure_openai.rs | 4 | ||||
| -rw-r--r-- | src/config/agent.rs | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/client/azure_openai.rs b/src/client/azure_openai.rs index 7052b84..cd1d9e4 100644 --- a/src/client/azure_openai.rs +++ b/src/client/azure_openai.rs @@ -51,7 +51,7 @@ fn prepare_chat_completions( let api_key = self_.get_api_key()?; let url = format!( - "{}/openai/deployments/{}/chat/completions?api-version=2024-02-01", + "{}/openai/deployments/{}/chat/completions?api-version=2024-10-21", &api_base, self_.model.name() ); @@ -70,7 +70,7 @@ fn prepare_embeddings(self_: &AzureOpenAIClient, data: &EmbeddingsData) -> Resul let api_key = self_.get_api_key()?; let url = format!( - "{}/openai/deployments/{}/embeddings?api-version=2024-02-01", + "{}/openai/deployments/{}/embeddings?api-version=2024-10-21", &api_base, self_.model.name() ); diff --git a/src/config/agent.rs b/src/config/agent.rs index c81ed11..6418efa 100644 --- a/src/config/agent.rs +++ b/src/config/agent.rs @@ -334,10 +334,7 @@ impl Agent { self.variable_envs(), )?; match value { - Some(v) => { - println!(); - Ok(v) - } + Some(v) => Ok(v), _ => bail!("No return value from '_instructions' function"), } } |
