Compare commits

...

7 Commits
0.1.2 ... main

Author SHA1 Message Date
aa0 ffa2bc9bd2
Remove commented code in `get_last_vqd`. 2024-08-05 06:54:25 +01:00
Ahmad-A0 c49bbd2692 Update README and config.rs to mark GPT4o as the newer model 2024-08-04 02:20:51 +01:00
Ahmad-A0 f0d3ef36e2 Disable retrieving the vqd, as it seems to break things 2024-08-04 02:12:50 +01:00
Ahmad-A0 (aider) 146ea25974 fix: Update GPT4OMini model identifier 2024-08-04 01:41:58 +01:00
Ahmad-A0 (aider) 1d9a05fb51 feat: Add gpt-4o-mini model to config 2024-08-04 01:41:15 +01:00
blek 1baf800e3d Merge pull request 'add flake' (#3) from loafey/hey:main into main
Reviewed-on: #3
2024-06-10 12:59:03 +02:00
loafey 04ea44dcb7 add flake 2024-06-07 17:06:24 +02:00
5 changed files with 134 additions and 10 deletions

View File

@ -45,7 +45,7 @@ you can set their paths and filenames via `HEY_CONFIG_PATH`, `HEY_CONFIG_FILENAM
## config file reference
```toml
model = "Claude" # or "GPT3"
model = "Claude" # or "GPT4OMini"
tos = false # whether if you agree to ddg chat tos
```

92
flake.lock Normal file
View File

@ -0,0 +1,92 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"naersk": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1717067539,
"narHash": "sha256-oIs5EF+6VpHJRvvpVWuqCYJMMVW/6h59aYUv9lABLtY=",
"owner": "nix-community",
"repo": "naersk",
"rev": "fa19d8c135e776dc97f4dcca08656a0eeb28d5c0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "naersk",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 0,
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
"path": "/nix/store/8s55w0927lh3mdbkxf434zb0c5hqsz8z-source",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1717646450,
"narHash": "sha256-KE+UmfSVk5PG8jdKdclPVcMrUB8yVZHbsjo7ZT1Bm3c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "818dbe2f96df233d2041739d6079bb616d3e5597",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"naersk": "naersk",
"nixpkgs": "nixpkgs_2"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

34
flake.nix Normal file
View File

@ -0,0 +1,34 @@
{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = { self, flake-utils, naersk, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs) {
inherit system;
};
naersk' = pkgs.callPackage naersk { };
in
rec {
defaultPackage = naersk'.buildPackage
{
src = ./.;
buildInputs = with pkgs; [ openssl pkg-config ];
};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
openssl
pkg-config
clippy
rust-analyzer
];
nativeBuildInputs = with pkgs; [ rustc cargo ];
};
}
);
}

View File

@ -76,10 +76,6 @@ impl Cache {
}
pub fn get_last_vqd<'a, T: From<&'a String>>(self: &'a Self) -> Option<T> {
if self.last_vqd_time - (chrono::Local::now().timestamp_millis() as u64) < 60000 {
Some((&self.last_vqd).into())
} else {
None
}
None
}
}
}

View File

@ -8,10 +8,11 @@ pub enum Model {
// outdated
Claude12,
GPT35,
GPT3,
// current
Claude,
GPT3,
GPT4OMini,
Llama,
Mixtral
}
@ -25,7 +26,8 @@ impl ToString for Model {
Self::Claude => String::from("claude-3-haiku-20240307"),
Self::GPT3 => String::from("gpt-3.5-turbo-0125"),
Self::Llama => String::from("meta-llama/Llama-3-70b-chat-hf"),
Self::Mixtral => String::from("mistralai/Mixtral-8x7B-Instruct-v0.1")
Self::Mixtral => String::from("mistralai/Mixtral-8x7B-Instruct-v0.1"),
Self::GPT4OMini => String::from("gpt-4o-mini")
}
}
}
@ -92,4 +94,4 @@ impl Config {
Ok(conf)
}
}
}
}