diff options
| author | sigoden <sigoden@gmail.com> | 2024-05-30 17:10:02 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-30 17:10:02 +0800 |
| commit | 54a837784c3df7e73c7c95adfef96e68c842984b (patch) | |
| tree | e090da40436bd3c1220d5ab88071ac33397ce57c /src/config | |
| parent | fa4bf14e02b1e6361b38014fe6a986738cf06837 (diff) | |
| download | aichat-54a837784c3df7e73c7c95adfef96e68c842984b.tar.gz | |
refactor: rename `SendData` to `CompletionData` (#553)
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/input.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/config/input.rs b/src/config/input.rs index fd42bf8..44bbb4b 100644 --- a/src/config/input.rs +++ b/src/config/input.rs @@ -1,8 +1,8 @@ use super::{role::Role, session::Session, GlobalConfig}; use crate::client::{ - init_client, list_models, Client, ImageUrl, Message, MessageContent, MessageContentPart, - MessageRole, Model, SendData, + init_client, list_models, Client, CompletionData, ImageUrl, Message, MessageContent, + MessageContentPart, MessageRole, Model, }; use crate::function::{ToolCallResult, ToolResults}; use crate::utils::{base64_encode, sha256}; @@ -149,7 +149,7 @@ impl Input { init_client(&self.config, Some(self.model())) } - pub fn prepare_send_data(&self, model: &Model, stream: bool) -> Result<SendData> { + pub fn prepare_completion_data(&self, model: &Model, stream: bool) -> Result<CompletionData> { if !self.medias.is_empty() && !model.supports_vision() { bail!("The current model does not support vision."); } @@ -176,7 +176,7 @@ impl Input { }; functions = config.function.select(function_matcher); }; - Ok(SendData { + Ok(CompletionData { messages, temperature, top_p, |
