mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-07 01:21:03 +01:00
aichat: init (#7207)
aichat is an all in one CLI tool for AI interactions. On first run it prompts you to create a config so I made a home manager module to do this declaratively.
This commit is contained in:
parent
ffab96a8b4
commit
86b95fc1ed
7 changed files with 111 additions and 0 deletions
3
tests/modules/programs/aichat/default.nix
Normal file
3
tests/modules/programs/aichat/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
aichat-settings = ./settings.nix;
|
||||
}
|
||||
26
tests/modules/programs/aichat/settings.nix
Normal file
26
tests/modules/programs/aichat/settings.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.aichat = {
|
||||
enable = true;
|
||||
settings = {
|
||||
model = "Ollama:mistral-small:latest";
|
||||
clients = [
|
||||
{
|
||||
type = "openai-compatible";
|
||||
name = "Ollama";
|
||||
api_base = "http://localhost:11434/v1";
|
||||
models = [
|
||||
{
|
||||
name = "llama3.2:latest";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.config/aichat/config.yaml
|
||||
assertFileContent home-files/.config/aichat/config.yaml \
|
||||
${./settings.yml}
|
||||
'';
|
||||
}
|
||||
7
tests/modules/programs/aichat/settings.yml
Normal file
7
tests/modules/programs/aichat/settings.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
clients:
|
||||
- api_base: http://localhost:11434/v1
|
||||
models:
|
||||
- name: llama3.2:latest
|
||||
name: Ollama
|
||||
type: openai-compatible
|
||||
model: Ollama:mistral-small:latest
|
||||
Loading…
Add table
Add a link
Reference in a new issue