diff options
| author | sigoden <sigoden@gmail.com> | 2024-06-05 09:02:23 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-05 09:02:23 +0800 |
| commit | 1ec6abfaee2fdc189b348b7e3a8145bd9a84da74 (patch) | |
| tree | 6f68a860a39b0fbe87784de925b5a31e00e74e33 /src/client/ernie.rs | |
| parent | 71f2e94579511d7524f5534377001ab3f02a9597 (diff) | |
| download | aichat-1ec6abfaee2fdc189b348b7e3a8145bd9a84da74.tar.gz | |
feat: support RAG (#560)
* feat: support RAG
* support more embeddings models and implement concurrent embedding api
* show the progress of addings paths
* ignore embedding context when saving message
* embedding model max_chunk_size => default_chunk_size
* support pdf and pandoc formats (docx, epub, ipynb)
Diffstat (limited to 'src/client/ernie.rs')
| -rw-r--r-- | src/client/ernie.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/client/ernie.rs b/src/client/ernie.rs index 097ee68..77f4741 100644 --- a/src/client/ernie.rs +++ b/src/client/ernie.rs @@ -1,8 +1,5 @@ -use super::{ - access_token::*, maybe_catch_error, patch_system_message, sse_stream, ChatCompletionsData, - ChatCompletionsOutput, Client, ErnieClient, ExtraConfig, Model, ModelData, ModelPatches, - PromptAction, PromptKind, SseHandler, SseMmessage, -}; +use super::*; +use super::access_token::*; use anyhow::{anyhow, Context, Result}; use async_trait::async_trait; @@ -37,7 +34,7 @@ impl ErnieClient { data: ChatCompletionsData, ) -> Result<RequestBuilder> { let mut body = build_chat_completions_body(data, &self.model); - self.patch_request_body(&mut body); + self.patch_chat_completions_body(&mut body); let access_token = get_access_token(self.name())?; |
