diff options
| author | sigoden <sigoden@gmail.com> | 2024-06-01 17:47:49 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-01 17:47:49 +0800 |
| commit | 571d1022f628cb7d2a3125664bd3293bac4471b5 (patch) | |
| tree | 67034aaf0a656ae9dce0cd0d3aae3605d2ea1767 /src/repl | |
| parent | 259583f4f750e4ece7aed07858a9589110d7cf5d (diff) | |
| download | aichat-571d1022f628cb7d2a3125664bd3293bac4471b5.tar.gz | |
refactor: rename some client structs and methods (#555)
* rename `Completeion*` to `ChatCompletions*`
* rename `send_message*` to `chat_completions*`
* rename `request_builder` to `chat_completions_builder`
* rename `build_body` to `build_chat_completions_body`
* rename `extract_completion` to `extract_chat_completions`
* format
* remove unused config fields
Diffstat (limited to 'src/repl')
| -rw-r--r-- | src/repl/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/repl/mod.rs b/src/repl/mod.rs index f62f210..b78d39d 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -464,7 +464,7 @@ fn parse_command(line: &str) -> Option<(&str, Option<&str>)> { async fn compress_session(config: &GlobalConfig) -> Result<()> { let input = Input::from_str(config, config.read().summarize_prompt(), None); let client = input.create_client()?; - let summary = client.send_message(input).await?.text; + let summary = client.chat_completions(input).await?.text; config.write().compress_session(&summary); Ok(()) } |
