Skip to content

Commit

Permalink
Improve summarize token args.
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Aug 13, 2023
1 parent 6b6149d commit 34c707f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jarvis"
version = "0.7.7"
version = "0.7.8"
edition = "2021"
rust-version = "1.64"
description = ""
Expand Down
4 changes: 2 additions & 2 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ static TRANSLATE_SECTION_TOKENS: usize = 6000;
static TRANSLATE_HIGH_TOKENS: usize = 7000;

// gpt-35-turbo, 4096
static SUMMARIZE_SECTION_TOKENS: usize = 3000;
static SUMMARIZE_HIGH_TOKENS: usize = 3500;
static SUMMARIZE_SECTION_TOKENS: usize = 2800;
static SUMMARIZE_HIGH_TOKENS: usize = 3200;

// text-embedding-ada-002, 8191
// https://community.openai.com/t/embedding-text-length-vs-accuracy/96564
Expand Down
2 changes: 1 addition & 1 deletion src/openai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ impl OpenAI {
text: &str,
) -> Result<CreateChatCompletionResponse> {
let mut req_body = CreateChatCompletionRequestArgs::default()
.max_tokens(256u16)
.max_tokens(800u16)
.temperature(0f32)
.messages([
ChatCompletionRequestMessageArgs::default()
Expand Down

0 comments on commit 34c707f

Please sign in to comment.