From 8dba46becfbcc4669867db4487aa9b91c51e4afa Mon Sep 17 00:00:00 2001 From: sigoden Date: Tue, 30 Apr 2024 12:52:58 +0800 Subject: feat: openai-compatible platforms share the same client (#469) --- src/client/qianwen.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/qianwen.rs') diff --git a/src/client/qianwen.rs b/src/client/qianwen.rs index b1ba093..76d7436 100644 --- a/src/client/qianwen.rs +++ b/src/client/qianwen.rs @@ -1,6 +1,6 @@ use super::{ maybe_catch_error, message::*, sse_stream, Client, CompletionDetails, ExtraConfig, Model, - ModelConfig, PromptKind, PromptType, QianwenClient, SendData, SsMmessage, SseHandler, + ModelConfig, PromptAction, PromptKind, QianwenClient, SendData, SsMmessage, SseHandler, }; use crate::utils::{base64_decode, sha256}; @@ -33,7 +33,7 @@ pub struct QianwenConfig { impl QianwenClient { config_get_fn!(api_key, get_api_key); - 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 { -- cgit v1.2.3