summaryrefslogtreecommitdiffstats
path: root/src/client/openai.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-04-30 12:52:58 +0800
committerGitHub <noreply@github.com>2024-04-30 12:52:58 +0800
commit8dba46becfbcc4669867db4487aa9b91c51e4afa (patch)
tree7b67d556751d9f5fed380b50b818ddb8680c8f01 /src/client/openai.rs
parent8a65337d590729f96a5f3c0b35dc5a08fae5bf94 (diff)
downloadaichat-8dba46becfbcc4669867db4487aa9b91c51e4afa.tar.gz
feat: openai-compatible platforms share the same client (#469)
Diffstat (limited to 'src/client/openai.rs')
-rw-r--r--src/client/openai.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/openai.rs b/src/client/openai.rs
index 7e8fb87..08bb94d 100644
--- a/src/client/openai.rs
+++ b/src/client/openai.rs
@@ -1,6 +1,6 @@
use super::{
catch_error, sse_stream, CompletionDetails, ExtraConfig, Model, ModelConfig, OpenAIClient,
- PromptKind, PromptType, SendData, SsMmessage, SseHandler,
+ PromptAction, PromptKind, SendData, SsMmessage, SseHandler,
};
use anyhow::{anyhow, Result};
@@ -25,7 +25,7 @@ impl OpenAIClient {
config_get_fn!(api_key, get_api_key);
config_get_fn!(api_base, get_api_base);
- pub const PROMPTS: [PromptType<'static>; 1] =
+ pub const PROMPTS: [PromptAction<'static>; 1] =
[("api_key", "API Key:", true, PromptKind::String)];
fn request_builder(&self, client: &ReqwestClient, data: SendData) -> Result<RequestBuilder> {