Skip to content

Commit

Permalink
. update async-openai to 0.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremychone committed Jan 7, 2024
1 parent cb1e67a commit 3df400c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
6 changes: 3 additions & 3 deletions crates/ai-buddy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ keywords = [
[lib]
doctest = false

[lints]
[lints]
workspace = true

[dependencies]
# -- Async
tokio = { version = "1", features = ["full"] }
# -- AI
async-openai = "0.17"
async-openai = "0.18"
# -- D/Serialize
toml = "0.8"
serde = { version = "1", features = ["derive"] }
Expand All @@ -33,6 +33,6 @@ dialoguer = "0.11"
console = "0.15"
textwrap = "0.16"
# -- Files
simple-fs = { version = "0.0.4", features = ["with-json", "with-toml"] }
simple-fs = { version = "0.1", features = ["with-json", "with-toml"] }
# -- Others
derive_more = {version = "1.0.0-beta", features = ["from", "display", "deref"] }
2 changes: 1 addition & 1 deletion crates/ai-buddy/src/ais/asst.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ pub async fn get_files_hashmap(

// -- Get all files for org (those files have .filename)
let oa_files = oac.files();
let org_files = oa_files.list().await?.data;
let org_files = oa_files.list(&[("purpose", "assistants")]).await?.data;

// -- Build or file_name:file_id hashmap
let file_id_by_name: HashMap<String, FileId> = org_files
Expand Down
2 changes: 1 addition & 1 deletion crates/ai-buddy/src/ais/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn new_ais_client(event_bus: EventBus) -> Result<AisClient> {
#[allow(dead_code)]
async fn delete_org_files(oac: &OaClient, globs: &[&str]) -> Result<u32> {
let oa_files = oac.files();
let files = oa_files.list().await?;
let files = oa_files.list(&[("purpose", "assistants")]).await?;
let mut count = 0;

if globs.is_empty() {
Expand Down
8 changes: 0 additions & 8 deletions crates/ai-buddy/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ pub enum Error {
DeleteAllFilesRequiresAtLeastOneGlob,
RunError(RunStatus),

// -- Utils
FileNotFound(String),
FileCannotBundleNoneFile(String),
FileCannotCreate {
file: String,
cause: io::Error,
},

// -- Event
#[from]
BoadcastSend(broadcast::error::SendError<event::Event>),
Expand Down

0 comments on commit 3df400c

Please sign in to comment.