ai_client 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Rakefile +1 -0
- data/lib/ai_client/configuration.rb +14 -5
- data/lib/ai_client/models.yml +659 -620
- data/lib/ai_client/ollama_extensions.rb +191 -0
- data/lib/ai_client/version.rb +1 -1
- data/lib/ai_client/xai.rb +35 -0
- data/lib/ai_client.rb +15 -9
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc222406f840959b9987644d5f274b7422d7b157dc5ebaff6d22866a762d30f0
|
4
|
+
data.tar.gz: d534d1b7a975f1efe1d149fe558c8748c192bf41b4ee1a198d73488bb03a64e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b988d95990e8b420aac8f4a30d5cdfa1ec80125d52d0ed0a48bae01d3c2e8a89a0e8307c7698ebb0818be4601f996618457fda25deeb07c608232e055e23bb8
|
7
|
+
data.tar.gz: ad9af7a235571f780873d1a0840fc89820e8e00a56b72e7ce9e0aa67626dcdcdaef306e0cb6333eb717320f53401d20e6ec72bdc876ba4d84492b3000f866fca
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
### [0.4.4] - 2025-03-02
|
4
|
+
- Added ability to obtain a list of available models from an Ollama server.
|
5
|
+
- Added `ollama_model_exists?` method to check if a specific model is available on an Ollama server.
|
6
|
+
- Added command-line utility `bin/list_ollama_models` to display available Ollama models.
|
7
|
+
- Added support for configuring custom Ollama hosts via the providers configuration.
|
8
|
+
|
3
9
|
### [0.4.3] - 2025-01-05
|
4
10
|
- updated models.yml file with latest dump from open_router
|
5
11
|
|
data/Rakefile
CHANGED
@@ -156,13 +156,22 @@ class AiClient
|
|
156
156
|
timeout: nil,
|
157
157
|
return_raw: false,
|
158
158
|
context_length: 5, # number of responses to add as context
|
159
|
-
providers: {
|
159
|
+
providers: {
|
160
|
+
ollama: {
|
161
|
+
host: 'http://localhost:11434'
|
162
|
+
},
|
163
|
+
localai: {
|
164
|
+
host: 'http://localhost:8080'
|
165
|
+
}
|
166
|
+
},
|
160
167
|
envar_api_key_names: {
|
161
168
|
anthropic: ['ANTHROPIC_API_KEY'],
|
162
169
|
google: ['GOOGLE_API_KEY'],
|
163
170
|
mistral: ['MISTRAL_API_KEY'],
|
171
|
+
ollama: ['OLLAMA_API_KEY'],
|
164
172
|
open_router: ['OPEN_ROUTER_API_KEY', 'OPENROUTER_API_KEY'],
|
165
|
-
openai: ['OPENAI_API_KEY']
|
173
|
+
openai: ['OPENAI_API_KEY'],
|
174
|
+
xai: ['XAI_API_KEY'],
|
166
175
|
},
|
167
176
|
provider_patterns: {
|
168
177
|
anthropic: /^claude/i,
|
@@ -177,10 +186,10 @@ class AiClient
|
|
177
186
|
default_model: {
|
178
187
|
anthropic: 'claude-3-5-sonnet-20240620',
|
179
188
|
openai: 'gpt-4o',
|
180
|
-
google: 'gemini-
|
189
|
+
google: 'gemini-2.0-flash',
|
181
190
|
mistral: 'mistral-large',
|
182
|
-
localai: 'llama3.
|
183
|
-
ollama: 'llama3.
|
191
|
+
localai: 'llama3.3',
|
192
|
+
ollama: 'llama3.3',
|
184
193
|
open_router: 'auto'
|
185
194
|
}
|
186
195
|
)
|