Skip to content

chorn: Update async-openai version to 0.24.1 and fix content type in OpenAIClient #626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion atlas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ tokio = { workspace = true, features = ["macros"] }
reqwest = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
async-openai = "0.23.4"
async-openai = "0.24.1"
2 changes: 1 addition & 1 deletion atlas/src/api/openai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl AskModel for OpenAIClient {
ChatRole::User => {
messages.push(
ChatCompletionRequestSystemMessageArgs::default()
.content(content)
.content(content.as_str())
.build()?
.into(),
);
Expand Down
3 changes: 3 additions & 0 deletions ceres/src/lfs/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ pub async fn lfs_upload_object(
let meta = lfs_get_meta(storage.clone(), &request_vars.oid)
.await
.unwrap();
tracing::debug!("upload lfs object {} size: {}", meta.oid, meta.size);
if config.enable_split && meta.splited {
// assert!(request_vars.size == body_bytes.len() as i64, "size didn't match: {} != {}", request_vars.size, body_bytes.len()); // TODO: git client, request_vars.size is `0`!!
// split object to blocks
Expand All @@ -320,6 +321,8 @@ pub async fn lfs_upload_object(
}
sub_ids.push(sub_id);
}
tracing::debug!("lfs object {} split into {} chunks", meta.oid, sub_ids.len());

// save the relationship to database
let mut offset = 0;
for sub_id in sub_ids {
Expand Down
Loading