Skip to content

Commit

Permalink
Merge pull request #50 from cosmonaut-nz/prompt_tune
Browse files Browse the repository at this point in the history
chore: Package updates.
  • Loading branch information
avastmick committed Jan 2, 2024
2 parents 2ac027a + 5f51c83 commit 3ba040d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
19 changes: 9 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cosmonaut_code"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
license = "CC BY-NC-ND 4.0"
readme = "README.md"
Expand All @@ -18,26 +18,25 @@ name = "cosmonaut_code"
path = "src/main.rs"

[dependencies]
openai-api-rs = "2.1.6"
# openai-api-rs = { git = "https://github.com/cosmonaut-nz/openai-api-rs.git"}
openai-api-rs = "2.1.7"
google-generative-ai-rs = "0.1.4"
# google-generative-ai-rs = { git = "https://github.com/avastmick/google-generative-ai-rs.git", version = "0.1.3" }
thiserror = "1.0.50"
thiserror = "1.0.55"
log = "0.4.20"
env_logger = "0.10.1"
inquire = "0.6.2"
tokio = { version = "1.34.0", features = ["full"] }
reqwest = { version = "0.11.22", features = ["json"] }
tokio = { version = "1.35.1", features = ["full"] }
reqwest = { version = "0.11.23", features = ["json"] }
config = "0.13.4"
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
serde_json = "1.0.109"
chrono = { version = "0.4.31", features = ["serde"] }
walkdir = "2.4.0"
regex = "1.10.2"
async-trait = "0.1.74"
async-trait = "0.1.76"
git2 = "0.18.1"
sha2 = "0.10.8"
handlebars = "4.5.0"
handlebars = "5.0.0"
# linguist-rs = "1.1.2" # Using direct repository fetch in place of crates.io as version is out of date (local code changes)
linguist-rs = { git = "https://github.com/cosmonaut-nz/linguist-rs.git", version = "1.1.2" }
gcp_auth = "0.10.0"
Expand All @@ -48,7 +47,7 @@ futures = "0.3.30"


[dev-dependencies]
tempfile = "3.8.1"
tempfile = "3.9.0"

[build-dependencies]
linguist-rs-build = { git = "https://github.com/cosmonaut-nz/linguist-rs.git", version = "1.1.1" }
3 changes: 3 additions & 0 deletions src/provider/google.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ pub(super) mod data {
google_response: &PostResult,
) -> ProviderCompletionResponse {
let mut messages: Vec<ProviderResponseMessage> = vec![];
// TODO: If this is a streamed response, it has much finer-tuned harm handling
// than the REST response (right now). It may be rejecting the prompt input as harmful
// and stopping the feed. I need to handle this and flag it to the user.
match google_response {
PostResult::Rest(response) => {
for candidate in &response.candidates {
Expand Down
4 changes: 2 additions & 2 deletions src/review/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl fmt::Display for OutputType {

/// Handlebars [`Helper`] to round a `f64` to two decimal places
fn format_percentage(
h: &Helper<'_, '_>,
h: &Helper<'_>,
_: &Handlebars<'_>,
_: &Context,
_: &mut RenderContext<'_, '_>,
Expand All @@ -174,7 +174,7 @@ fn format_percentage(
}
/// Handlebars [`Helper`] to render a '\n' character to "<br" HTML
fn newline_to_br(
h: &Helper<'_, '_>,
h: &Helper<'_>,
_: &Handlebars,
_: &Context,
_: &mut RenderContext<'_, '_>,
Expand Down

0 comments on commit 3ba040d

Please sign in to comment.