Compare commits
No commits in common. "main" and "0.1.2" have entirely different histories.
|
@ -45,7 +45,7 @@ you can set their paths and filenames via `HEY_CONFIG_PATH`, `HEY_CONFIG_FILENAM
|
||||||
|
|
||||||
## config file reference
|
## config file reference
|
||||||
```toml
|
```toml
|
||||||
model = "Claude" # or "GPT4OMini"
|
model = "Claude" # or "GPT3"
|
||||||
tos = false # whether if you agree to ddg chat tos
|
tos = false # whether if you agree to ddg chat tos
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
92
flake.lock
92
flake.lock
|
@ -1,92 +0,0 @@
|
||||||
{
|
|
||||||
"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
34
flake.nix
|
@ -1,34 +0,0 @@
|
||||||
{
|
|
||||||
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 ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
|
@ -76,6 +76,10 @@ impl Cache {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_last_vqd<'a, T: From<&'a String>>(self: &'a Self) -> Option<T> {
|
pub fn get_last_vqd<'a, T: From<&'a String>>(self: &'a Self) -> Option<T> {
|
||||||
None
|
if self.last_vqd_time - (chrono::Local::now().timestamp_millis() as u64) < 60000 {
|
||||||
|
Some((&self.last_vqd).into())
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -8,11 +8,10 @@ pub enum Model {
|
||||||
// outdated
|
// outdated
|
||||||
Claude12,
|
Claude12,
|
||||||
GPT35,
|
GPT35,
|
||||||
GPT3,
|
|
||||||
|
|
||||||
// current
|
// current
|
||||||
Claude,
|
Claude,
|
||||||
GPT4OMini,
|
GPT3,
|
||||||
Llama,
|
Llama,
|
||||||
Mixtral
|
Mixtral
|
||||||
}
|
}
|
||||||
|
@ -26,8 +25,7 @@ impl ToString for Model {
|
||||||
Self::Claude => String::from("claude-3-haiku-20240307"),
|
Self::Claude => String::from("claude-3-haiku-20240307"),
|
||||||
Self::GPT3 => String::from("gpt-3.5-turbo-0125"),
|
Self::GPT3 => String::from("gpt-3.5-turbo-0125"),
|
||||||
Self::Llama => String::from("meta-llama/Llama-3-70b-chat-hf"),
|
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")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,4 +92,4 @@ impl Config {
|
||||||
Ok(conf)
|
Ok(conf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue