Refactored, added comprehensive testing.
All checks were successful
Release / release (push) Successful in 3m17s
All checks were successful
Release / release (push) Successful in 3m17s
This commit is contained in:
1
config/testdata/api.key
vendored
Normal file
1
config/testdata/api.key
vendored
Normal file
@@ -0,0 +1 @@
|
||||
sk-test-key-123
|
||||
1
config/testdata/api_whitespace.key
vendored
Normal file
1
config/testdata/api_whitespace.key
vendored
Normal file
@@ -0,0 +1 @@
|
||||
sk-whitespace-key
|
||||
0
config/testdata/empty.yaml
vendored
Normal file
0
config/testdata/empty.yaml
vendored
Normal file
3
config/testdata/invalid.yaml
vendored
Normal file
3
config/testdata/invalid.yaml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
protocol: openai
|
||||
url: [this is not valid yaml syntax
|
||||
model: gpt-4
|
||||
2
config/testdata/partial.yaml
vendored
Normal file
2
config/testdata/partial.yaml
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
model: gpt-4
|
||||
fallback: gpt-3.5-turbo
|
||||
1
config/testdata/system.txt
vendored
Normal file
1
config/testdata/system.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
You are a helpful assistant.
|
||||
0
config/testdata/system_empty.txt
vendored
Normal file
0
config/testdata/system_empty.txt
vendored
Normal file
4
config/testdata/unknown_keys.yaml
vendored
Normal file
4
config/testdata/unknown_keys.yaml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
protocol: openai
|
||||
model: gpt-4
|
||||
unknown_field: ignored
|
||||
another_unknown: also_ignored
|
||||
6
config/testdata/valid.yaml
vendored
Normal file
6
config/testdata/valid.yaml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
protocol: ollama
|
||||
url: http://localhost:11434/api/chat
|
||||
key_file: ~/.aicli_key
|
||||
model: llama3
|
||||
fallback: llama2,mistral
|
||||
system_file: ~/system.txt
|
||||
Reference in New Issue
Block a user