yaicli 0.6.3__tar.gz → 0.7.0__tar.gz
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.
- {yaicli-0.6.3 → yaicli-0.7.0}/PKG-INFO +231 -19
- {yaicli-0.6.3 → yaicli-0.7.0}/README.md +226 -17
- {yaicli-0.6.3 → yaicli-0.7.0}/pyproject.toml +14 -1
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/cli.py +2 -2
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/config.py +1 -1
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/const.py +19 -8
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/entry.py +24 -1
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/functions/__init__.py +13 -1
- yaicli-0.7.0/yaicli/llms/client.py +153 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/provider.py +3 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/ai21_provider.py +33 -1
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/chatglm_provider.py +38 -11
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/cohere_provider.py +6 -3
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/deepseek_provider.py +2 -1
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/doubao_provider.py +0 -14
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/gemini_provider.py +29 -28
- yaicli-0.7.0/yaicli/llms/providers/huggingface_provider.py +40 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/infiniai_provider.py +4 -2
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/modelscope_provider.py +2 -1
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/openai_provider.py +20 -11
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/siliconflow_provider.py +2 -1
- yaicli-0.7.0/yaicli/tools/__init__.py +127 -0
- yaicli-0.7.0/yaicli/tools/function.py +90 -0
- yaicli-0.7.0/yaicli/tools/mcp.py +459 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/utils.py +34 -0
- yaicli-0.6.3/yaicli/llms/client.py +0 -120
- yaicli-0.6.3/yaicli/tools.py +0 -159
- {yaicli-0.6.3 → yaicli-0.7.0}/.gitignore +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/LICENSE +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/__init__.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/chat.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/console.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/exceptions.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/functions/buildin/execute_shell_command.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/history.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/__init__.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/chutes_provider.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/groq_provider.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/minimax_provider.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/ollama_provider.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/openrouter_provider.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/sambanova_provider.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/targon_provider.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/vertexai_provider.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/xai_provider.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/llms/providers/yi_provider.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/printer.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/render.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/role.py +0 -0
- {yaicli-0.6.3 → yaicli-0.7.0}/yaicli/schemas.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: yaicli
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.7.0
|
4
4
|
Summary: A simple CLI tool to interact with LLM
|
5
5
|
Project-URL: Homepage, https://github.com/belingud/yaicli
|
6
6
|
Project-URL: Repository, https://github.com/belingud/yaicli
|
@@ -208,7 +208,7 @@ License: Apache License
|
|
208
208
|
See the License for the specific language governing permissions and
|
209
209
|
limitations under the License.
|
210
210
|
License-File: LICENSE
|
211
|
-
Keywords: ai,ai-assistant,ai-chat,ai-interaction,anthropic,chatgpt,claude,cli,cohere,command-line,completion,console-application,conversation,gemini,gpt,groq,inference,interactive,language-model,llm,llms,mistral,nlp,openai,prompt,python-tool,shell-integration,terminal,terminal-interface,text-generation
|
211
|
+
Keywords: ai,ai-assistant,ai-chat,ai-interaction,anthropic,chatglm,chatgpt,claude,cli,cohere,command-line,completion,console-application,conversation,deepseek,gemini,gpt,groq,huggingface,inference,interactive,language-model,llm,llms,mistral,modelscope,nlp,ollama,openai,prompt,python-tool,sambanova,shell-integration,siliconflow,terminal,terminal-interface,text-generation,vertexai,xai
|
212
212
|
Classifier: License :: OSI Approved :: Apache Software License
|
213
213
|
Classifier: Operating System :: OS Independent
|
214
214
|
Classifier: Programming Language :: Python :: 3
|
@@ -226,6 +226,7 @@ Requires-Dist: typer>=0.16.0
|
|
226
226
|
Provides-Extra: all
|
227
227
|
Requires-Dist: cohere>=5.15.0; extra == 'all'
|
228
228
|
Requires-Dist: google-genai>=1.20.0; extra == 'all'
|
229
|
+
Requires-Dist: huggingface-hub>=0.33.0; extra == 'all'
|
229
230
|
Requires-Dist: ollama>=0.5.1; extra == 'all'
|
230
231
|
Requires-Dist: volcengine-python-sdk>=3.0.15; extra == 'all'
|
231
232
|
Provides-Extra: cohere
|
@@ -234,6 +235,8 @@ Provides-Extra: doubao
|
|
234
235
|
Requires-Dist: volcengine-python-sdk>=3.0.15; extra == 'doubao'
|
235
236
|
Provides-Extra: gemini
|
236
237
|
Requires-Dist: google-genai>=1.20.0; extra == 'gemini'
|
238
|
+
Provides-Extra: huggingface
|
239
|
+
Requires-Dist: huggingface-hub>=0.33.0; extra == 'huggingface'
|
237
240
|
Provides-Extra: ollama
|
238
241
|
Requires-Dist: ollama>=0.5.1; extra == 'ollama'
|
239
242
|
Description-Content-Type: text/markdown
|
@@ -262,6 +265,7 @@ generate and execute shell commands, or get quick answers without leaving your w
|
|
262
265
|
> [!NOTE]
|
263
266
|
> YAICLI is actively developed. While core functionality is stable, some features may evolve in future releases.
|
264
267
|
|
268
|
+
> We support MCP since v0.7.0!
|
265
269
|
> We support Function Call since v0.5.0!
|
266
270
|
|
267
271
|
## ✨ Key Features
|
@@ -326,14 +330,8 @@ Yaicli has several optional dependencies group, you can copy below commands to i
|
|
326
330
|
# install all denpendencies
|
327
331
|
pip install 'yaicli[all]'
|
328
332
|
|
329
|
-
# install with
|
330
|
-
pip instsall 'yaicli[ollama]'
|
331
|
-
|
332
|
-
# install with cohere support
|
333
|
-
pip install 'yaicli[cohere]'
|
334
|
-
|
335
|
-
# install with doubao support
|
336
|
-
pip install 'yaicli[doubao]'
|
333
|
+
# install with specific provider support
|
334
|
+
pip instsall 'yaicli[ollama,cohere,doubao,huggingface,gemini]'
|
337
335
|
```
|
338
336
|
|
339
337
|
Install by `uv`.
|
@@ -342,14 +340,8 @@ Install by `uv`.
|
|
342
340
|
# install all denpendencies
|
343
341
|
uv tool install 'yaicli[all]'
|
344
342
|
|
345
|
-
# install with
|
346
|
-
uv tool instsall 'yaicli[ollama]'
|
347
|
-
|
348
|
-
# install with cohere support
|
349
|
-
uv tool install 'yaicli[cohere]'
|
350
|
-
|
351
|
-
# install with doubao support
|
352
|
-
uv tool install 'yaicli[doubao]'
|
343
|
+
# install with specific provider support
|
344
|
+
uv tool instsall 'yaicli[ollama,cohere,doubao,huggingface,gemini]'
|
353
345
|
```
|
354
346
|
|
355
347
|
### Install from Source
|
@@ -360,6 +352,31 @@ cd yaicli
|
|
360
352
|
pip install .
|
361
353
|
```
|
362
354
|
|
355
|
+
## Buildin Supported Providers
|
356
|
+
|
357
|
+
- AI21
|
358
|
+
- Chatglm
|
359
|
+
- Chuts
|
360
|
+
- Cohere
|
361
|
+
- Cohere Badrock
|
362
|
+
- Cohere Sagemaker
|
363
|
+
- Deepseek
|
364
|
+
- Doubao
|
365
|
+
- Gemini
|
366
|
+
- Groq
|
367
|
+
- Huggingface
|
368
|
+
- Minimax
|
369
|
+
- ModelScope
|
370
|
+
- Ollama
|
371
|
+
- Openai
|
372
|
+
- Sambanova
|
373
|
+
- Siliconflow
|
374
|
+
- Targon
|
375
|
+
- Vertex ai
|
376
|
+
- X AI
|
377
|
+
- Yi
|
378
|
+
- Unlimited OpenAI-compatible providers
|
379
|
+
|
363
380
|
## ⚙️ Configuration
|
364
381
|
|
365
382
|
YAICLI uses a simple configuration file to store your preferences and API keys.
|
@@ -422,6 +439,10 @@ ROLE_MODIFY_WARNING=true
|
|
422
439
|
ENABLE_FUNCTIONS=true
|
423
440
|
# Set to false to disable showing function output in the response
|
424
441
|
SHOW_FUNCTION_OUTPUT=true
|
442
|
+
|
443
|
+
# MCP settings
|
444
|
+
ENABLE_MCP=false
|
445
|
+
SHOW_MCP_OUTPUT=false
|
425
446
|
```
|
426
447
|
|
427
448
|
### Configuration Options Reference
|
@@ -452,7 +473,10 @@ SHOW_FUNCTION_OUTPUT=true
|
|
452
473
|
| `MAX_SAVED_CHATS` | Max saved chats | `20` | `YAI_MAX_SAVED_CHATS` |
|
453
474
|
| `ROLE_MODIFY_WARNING` | Warn user when modifying role | `true` | `YAI_ROLE_MODIFY_WARNING` |
|
454
475
|
| `ENABLE_FUNCTIONS` | Enable function calling | `true` | `YAI_ENABLE_FUNCTIONS` |
|
455
|
-
| `SHOW_FUNCTION_OUTPUT` | Show function output
|
476
|
+
| `SHOW_FUNCTION_OUTPUT` | Show function output when calling function | `true` | `YAI_SHOW_FUNCTION_OUTPUT` |
|
477
|
+
| `ENABLE_MCP` | Enable MCP tools | `false` | `YAI_ENABLE_MCP` |
|
478
|
+
| `SHOW_MCP_OUTPUT` | Show MCP output when calling mcp | `true` | `YAI_SHOW_MCP_OUTPUT` |
|
479
|
+
|
456
480
|
|
457
481
|
### LLM Provider Configuration
|
458
482
|
|
@@ -497,6 +521,15 @@ API_KEY=
|
|
497
521
|
MODEL=gpt-4o
|
498
522
|
```
|
499
523
|
|
524
|
+
Extra params:
|
525
|
+
|
526
|
+
```ini
|
527
|
+
# REASONING_EFFORT: [high, midium, low]
|
528
|
+
REASONING_EFFORT=
|
529
|
+
```
|
530
|
+
|
531
|
+
See official for more details: https://platform.openai.com/docs/guides/reasoning?api-mode=chat
|
532
|
+
|
500
533
|
#### Deepseek
|
501
534
|
|
502
535
|
```ini
|
@@ -513,6 +546,50 @@ API_KEY=
|
|
513
546
|
MODEL=deepseek/deepseek-chat-v3-0324
|
514
547
|
```
|
515
548
|
|
549
|
+
#### Gemini
|
550
|
+
|
551
|
+
Basic config:
|
552
|
+
|
553
|
+
```ini
|
554
|
+
PROVIDER=gemini
|
555
|
+
API_KEY=
|
556
|
+
MODEL=gemini-2.5-flash
|
557
|
+
```
|
558
|
+
|
559
|
+
Extra params:
|
560
|
+
|
561
|
+
```ini
|
562
|
+
TOP_K=
|
563
|
+
PRESENCE_PENALTY=
|
564
|
+
FREQUENCY_PENALTY=
|
565
|
+
SEED=
|
566
|
+
THINKING_BUDGET=
|
567
|
+
API_VERSION=
|
568
|
+
BASE_URL=
|
569
|
+
```
|
570
|
+
|
571
|
+
#### Vertex AI
|
572
|
+
|
573
|
+
```ini
|
574
|
+
PROVIDER=vertexai
|
575
|
+
MODEL=gemini-2.5-flash
|
576
|
+
PROJECT=
|
577
|
+
LOCATION=
|
578
|
+
```
|
579
|
+
|
580
|
+
#### Huggingface
|
581
|
+
|
582
|
+
Default `HF_PROVIDER` is `auto`.
|
583
|
+
|
584
|
+
```ini
|
585
|
+
HF_PROVIDER=auto
|
586
|
+
PROVIDER=huggingface
|
587
|
+
API_KEY=
|
588
|
+
MODEL=deepseek-ai/DeepSeek-R1-0528
|
589
|
+
```
|
590
|
+
|
591
|
+
See official docs for `HF_PROVIDER`: https://huggingface.co/docs/inference-providers/index
|
592
|
+
|
516
593
|
#### Groq
|
517
594
|
|
518
595
|
```ini
|
@@ -537,6 +614,15 @@ API_KEY=
|
|
537
614
|
MODEL=glm-4-plus
|
538
615
|
```
|
539
616
|
|
617
|
+
Extra params:
|
618
|
+
|
619
|
+
Check offcial docs: https://bigmodel.cn/dev/api/normal-model/glm-4
|
620
|
+
|
621
|
+
```ini
|
622
|
+
# true or false
|
623
|
+
DO_SAMPLE=
|
624
|
+
```
|
625
|
+
|
540
626
|
#### Chutes
|
541
627
|
|
542
628
|
```ini
|
@@ -561,6 +647,16 @@ API_KEY=
|
|
561
647
|
MODEL=DeepSeek-V3-0324
|
562
648
|
```
|
563
649
|
|
650
|
+
Only a few models support tool call as below:
|
651
|
+
|
652
|
+
- Meta-Llama-3.1-8B-Instruct
|
653
|
+
- Meta-Llama-3.1-405B-Instruct
|
654
|
+
- Meta-Llama-3.3-70B-Instruct
|
655
|
+
- Llama-4-Scout-17B-16E-Instruct
|
656
|
+
- DeepSeek-V3-0324
|
657
|
+
|
658
|
+
See official docs for more detail: https://docs.sambanova.ai/cloud/docs/capabilities/function-calling
|
659
|
+
|
564
660
|
#### ModelScope
|
565
661
|
|
566
662
|
```ini
|
@@ -604,6 +700,45 @@ API_KEY=
|
|
604
700
|
MODEL=command-a-03-2025
|
605
701
|
```
|
606
702
|
|
703
|
+
Check official docs: https://docs.cohere.com/docs/text-gen-quickstart
|
704
|
+
|
705
|
+
Support keys:
|
706
|
+
|
707
|
+
```ini
|
708
|
+
ENVIRONMENT=
|
709
|
+
```
|
710
|
+
|
711
|
+
For private deploy and Azure api, you need to set BASE_URL.
|
712
|
+
|
713
|
+
```ini
|
714
|
+
PROVIDER=cohere
|
715
|
+
API_KEY=
|
716
|
+
MODEL=command-a-03-2025
|
717
|
+
BASE_URL=<YOUR_ENDPOINT>
|
718
|
+
```
|
719
|
+
|
720
|
+
For Bedrock and Sagemaker cohere api, you have to set below keys:
|
721
|
+
|
722
|
+
See https://docs.cohere.com/docs/text-gen-quickstart.
|
723
|
+
|
724
|
+
```ini
|
725
|
+
PROVIDER=cohere-bedrock
|
726
|
+
; PROVIDER=cohere-sagemaker
|
727
|
+
API_KEY=
|
728
|
+
MODEL=command-a-03-2025
|
729
|
+
|
730
|
+
AWS_REGION=xx
|
731
|
+
AWS_ACCESS_KEY_ID=xx
|
732
|
+
AWS_SECRET_ACCESS_KEY=xx
|
733
|
+
AWS_SESSION_TOKEN=xx
|
734
|
+
```
|
735
|
+
|
736
|
+
Note `MODEL` for Sagemaker should be endpoint name
|
737
|
+
|
738
|
+
```ini
|
739
|
+
MODEL=<YOUR_ENDPOINT_NAME>
|
740
|
+
```
|
741
|
+
|
607
742
|
#### Doubao
|
608
743
|
|
609
744
|
You have to install doubao dependencies, `pip install 'yaicli[doubao]'`
|
@@ -1127,6 +1262,83 @@ Thinking:
|
|
1127
1262
|
Current directory size: 156M (using du -sh .).
|
1128
1263
|
```
|
1129
1264
|
|
1265
|
+
### MCP
|
1266
|
+
|
1267
|
+
Add your MCP config in `~/.config/yaicli/mcp.json` (`C:\Users\<user>\.config\yaicli\mcp.json` on Windows.).
|
1268
|
+
|
1269
|
+
`--enable-mcp` option is corresponds to the configuration key `ENABLE_MCP`.
|
1270
|
+
|
1271
|
+
Example:
|
1272
|
+
|
1273
|
+
```shell
|
1274
|
+
ai 'What is the latest exchange rate between the BTC and the US dollar?' --enable-mcp --show-mcp-output
|
1275
|
+
|
1276
|
+
Assistant:
|
1277
|
+
|
1278
|
+
@Mcp call: bing_search({"query": "latest exchange rate between BTC and US dollar"})
|
1279
|
+
╭─ Mcp output ──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
1280
|
+
│ [ │
|
1281
|
+
│ { │
|
1282
|
+
│ "id": "result_1751024997243_0", │
|
1283
|
+
│ "title": "BTC to USD - Bitcoin to US Dollar Conversion - Exchange Rates", │
|
1284
|
+
│ "link": "https://www.exchange-rates.org/converter/btc-usd", │
|
1285
|
+
│ "snippet": "11 小时之前 · 1 Bitcoin = 107,304 US Dollars as of June 27, 2025 03:00 AM UTC. You can get live exchange │
|
1286
|
+
│ rates between Bitcoin and US Dollars using exchange-rates.org, which aggregates …" │
|
1287
|
+
│ }, │
|
1288
|
+
│ { │
|
1289
|
+
│ "id": "result_1751024997245_1", │
|
1290
|
+
│ "title": "Live Bitcoin to US Dollars Exchange Rate - ₿ 1 …", │
|
1291
|
+
│ "link": "https://btc.currencyrate.today/usd", │
|
1292
|
+
│ "snippet": ".b_imgcap_altitle p strong,.b_imgcap_altitle .b_factrow strong{color:#767676}#b_results │
|
1293
|
+
│ .b_imgcap_altitle{line-height:22px}.b_hList img{display:block}..." │
|
1294
|
+
│ }, │
|
1295
|
+
│ { │
|
1296
|
+
│ "id": "result_1751024997246_2", │
|
1297
|
+
│ "title": "1 BTC to USD - Bitcoins to US Dollars Exchange Rate - Xe", │
|
1298
|
+
│ "link": "https://www.xe.com/currencyconverter/convert/?From=BTC&To=USD", │
|
1299
|
+
│ "snippet": "2025年6月15日 · Get the latest 1 Bitcoin to US Dollar rate for FREE with the original Universal Currency │
|
1300
|
+
│ Converter. Set rate alerts for to and learn more about Bitcoins and US Dollars from …" │
|
1301
|
+
│ }, │
|
1302
|
+
│ { │
|
1303
|
+
│ "id": "result_1751024997246_3", │
|
1304
|
+
│ "title": "BTC to USD Exchange Rates | Best Exchange Rates", │
|
1305
|
+
│ "link": "https://bestexchangerates.com/rates/btc-to-usd", │
|
1306
|
+
│ "snippet": "Bitcoin (BTC) to US dollar (USD) market data - latest interbank exchange rate, trend, chart & historic │
|
1307
|
+
│ rates. Sell BTC → Buy USD" │
|
1308
|
+
│ }, │
|
1309
|
+
│ { │
|
1310
|
+
│ "id": "result_1751024997247_4", │
|
1311
|
+
│ "title": "BTC to USD | Bitcoin to US Dollar - Investing.com", │
|
1312
|
+
│ "link": "https://www.investing.com/crypto/bitcoin/btc-usd", │
|
1313
|
+
│ "snippet": "Bitcoin Eyes 120k as Fed Rate Cuts Hopes Rise, US Dollar Falls to Multi-Year Lows BTC hovers around │
|
1314
|
+
│ 107.5k after attempts at 108k Fed rate cut optimism rises USD falls to its lowest level …" │
|
1315
|
+
│ } │
|
1316
|
+
│ ] │
|
1317
|
+
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
1318
|
+
Here are some current exchange rates for Bitcoin (BTC) to US Dollar (USD):
|
1319
|
+
|
1320
|
+
1 Exchange-Rates.org:
|
1321
|
+
₿1 Bitcoin = 💵107,304 US Dollars (as of June 27, 2025, 03:00 AM UTC).
|
1322
|
+
Link
|
1323
|
+
2 BTC.CurrencyRate.Today:
|
1324
|
+
Live Bitcoin to US Dollars exchange rate.
|
1325
|
+
Link
|
1326
|
+
3 Xe.com:
|
1327
|
+
Latest conversion rate and information about Bitcoin to US Dollars.
|
1328
|
+
Link
|
1329
|
+
4 BestExchangeRates.com:
|
1330
|
+
Current BTC to USD market data, including charts and historic rates.
|
1331
|
+
Link
|
1332
|
+
5 Investing.com:
|
1333
|
+
Bitcoin price analysis and live BTC to USD updates.
|
1334
|
+
Link
|
1335
|
+
|
1336
|
+
For the most accurate and up-to-date rate, I recommend checking one of these sources directly.
|
1337
|
+
```
|
1338
|
+
|
1339
|
+

|
1340
|
+
|
1341
|
+
|
1130
1342
|
## 💻 Technical Details
|
1131
1343
|
|
1132
1344
|
### Architecture
|
@@ -22,6 +22,7 @@ generate and execute shell commands, or get quick answers without leaving your w
|
|
22
22
|
> [!NOTE]
|
23
23
|
> YAICLI is actively developed. While core functionality is stable, some features may evolve in future releases.
|
24
24
|
|
25
|
+
> We support MCP since v0.7.0!
|
25
26
|
> We support Function Call since v0.5.0!
|
26
27
|
|
27
28
|
## ✨ Key Features
|
@@ -86,14 +87,8 @@ Yaicli has several optional dependencies group, you can copy below commands to i
|
|
86
87
|
# install all denpendencies
|
87
88
|
pip install 'yaicli[all]'
|
88
89
|
|
89
|
-
# install with
|
90
|
-
pip instsall 'yaicli[ollama]'
|
91
|
-
|
92
|
-
# install with cohere support
|
93
|
-
pip install 'yaicli[cohere]'
|
94
|
-
|
95
|
-
# install with doubao support
|
96
|
-
pip install 'yaicli[doubao]'
|
90
|
+
# install with specific provider support
|
91
|
+
pip instsall 'yaicli[ollama,cohere,doubao,huggingface,gemini]'
|
97
92
|
```
|
98
93
|
|
99
94
|
Install by `uv`.
|
@@ -102,14 +97,8 @@ Install by `uv`.
|
|
102
97
|
# install all denpendencies
|
103
98
|
uv tool install 'yaicli[all]'
|
104
99
|
|
105
|
-
# install with
|
106
|
-
uv tool instsall 'yaicli[ollama]'
|
107
|
-
|
108
|
-
# install with cohere support
|
109
|
-
uv tool install 'yaicli[cohere]'
|
110
|
-
|
111
|
-
# install with doubao support
|
112
|
-
uv tool install 'yaicli[doubao]'
|
100
|
+
# install with specific provider support
|
101
|
+
uv tool instsall 'yaicli[ollama,cohere,doubao,huggingface,gemini]'
|
113
102
|
```
|
114
103
|
|
115
104
|
### Install from Source
|
@@ -120,6 +109,31 @@ cd yaicli
|
|
120
109
|
pip install .
|
121
110
|
```
|
122
111
|
|
112
|
+
## Buildin Supported Providers
|
113
|
+
|
114
|
+
- AI21
|
115
|
+
- Chatglm
|
116
|
+
- Chuts
|
117
|
+
- Cohere
|
118
|
+
- Cohere Badrock
|
119
|
+
- Cohere Sagemaker
|
120
|
+
- Deepseek
|
121
|
+
- Doubao
|
122
|
+
- Gemini
|
123
|
+
- Groq
|
124
|
+
- Huggingface
|
125
|
+
- Minimax
|
126
|
+
- ModelScope
|
127
|
+
- Ollama
|
128
|
+
- Openai
|
129
|
+
- Sambanova
|
130
|
+
- Siliconflow
|
131
|
+
- Targon
|
132
|
+
- Vertex ai
|
133
|
+
- X AI
|
134
|
+
- Yi
|
135
|
+
- Unlimited OpenAI-compatible providers
|
136
|
+
|
123
137
|
## ⚙️ Configuration
|
124
138
|
|
125
139
|
YAICLI uses a simple configuration file to store your preferences and API keys.
|
@@ -182,6 +196,10 @@ ROLE_MODIFY_WARNING=true
|
|
182
196
|
ENABLE_FUNCTIONS=true
|
183
197
|
# Set to false to disable showing function output in the response
|
184
198
|
SHOW_FUNCTION_OUTPUT=true
|
199
|
+
|
200
|
+
# MCP settings
|
201
|
+
ENABLE_MCP=false
|
202
|
+
SHOW_MCP_OUTPUT=false
|
185
203
|
```
|
186
204
|
|
187
205
|
### Configuration Options Reference
|
@@ -212,7 +230,10 @@ SHOW_FUNCTION_OUTPUT=true
|
|
212
230
|
| `MAX_SAVED_CHATS` | Max saved chats | `20` | `YAI_MAX_SAVED_CHATS` |
|
213
231
|
| `ROLE_MODIFY_WARNING` | Warn user when modifying role | `true` | `YAI_ROLE_MODIFY_WARNING` |
|
214
232
|
| `ENABLE_FUNCTIONS` | Enable function calling | `true` | `YAI_ENABLE_FUNCTIONS` |
|
215
|
-
| `SHOW_FUNCTION_OUTPUT` | Show function output
|
233
|
+
| `SHOW_FUNCTION_OUTPUT` | Show function output when calling function | `true` | `YAI_SHOW_FUNCTION_OUTPUT` |
|
234
|
+
| `ENABLE_MCP` | Enable MCP tools | `false` | `YAI_ENABLE_MCP` |
|
235
|
+
| `SHOW_MCP_OUTPUT` | Show MCP output when calling mcp | `true` | `YAI_SHOW_MCP_OUTPUT` |
|
236
|
+
|
216
237
|
|
217
238
|
### LLM Provider Configuration
|
218
239
|
|
@@ -257,6 +278,15 @@ API_KEY=
|
|
257
278
|
MODEL=gpt-4o
|
258
279
|
```
|
259
280
|
|
281
|
+
Extra params:
|
282
|
+
|
283
|
+
```ini
|
284
|
+
# REASONING_EFFORT: [high, midium, low]
|
285
|
+
REASONING_EFFORT=
|
286
|
+
```
|
287
|
+
|
288
|
+
See official for more details: https://platform.openai.com/docs/guides/reasoning?api-mode=chat
|
289
|
+
|
260
290
|
#### Deepseek
|
261
291
|
|
262
292
|
```ini
|
@@ -273,6 +303,50 @@ API_KEY=
|
|
273
303
|
MODEL=deepseek/deepseek-chat-v3-0324
|
274
304
|
```
|
275
305
|
|
306
|
+
#### Gemini
|
307
|
+
|
308
|
+
Basic config:
|
309
|
+
|
310
|
+
```ini
|
311
|
+
PROVIDER=gemini
|
312
|
+
API_KEY=
|
313
|
+
MODEL=gemini-2.5-flash
|
314
|
+
```
|
315
|
+
|
316
|
+
Extra params:
|
317
|
+
|
318
|
+
```ini
|
319
|
+
TOP_K=
|
320
|
+
PRESENCE_PENALTY=
|
321
|
+
FREQUENCY_PENALTY=
|
322
|
+
SEED=
|
323
|
+
THINKING_BUDGET=
|
324
|
+
API_VERSION=
|
325
|
+
BASE_URL=
|
326
|
+
```
|
327
|
+
|
328
|
+
#### Vertex AI
|
329
|
+
|
330
|
+
```ini
|
331
|
+
PROVIDER=vertexai
|
332
|
+
MODEL=gemini-2.5-flash
|
333
|
+
PROJECT=
|
334
|
+
LOCATION=
|
335
|
+
```
|
336
|
+
|
337
|
+
#### Huggingface
|
338
|
+
|
339
|
+
Default `HF_PROVIDER` is `auto`.
|
340
|
+
|
341
|
+
```ini
|
342
|
+
HF_PROVIDER=auto
|
343
|
+
PROVIDER=huggingface
|
344
|
+
API_KEY=
|
345
|
+
MODEL=deepseek-ai/DeepSeek-R1-0528
|
346
|
+
```
|
347
|
+
|
348
|
+
See official docs for `HF_PROVIDER`: https://huggingface.co/docs/inference-providers/index
|
349
|
+
|
276
350
|
#### Groq
|
277
351
|
|
278
352
|
```ini
|
@@ -297,6 +371,15 @@ API_KEY=
|
|
297
371
|
MODEL=glm-4-plus
|
298
372
|
```
|
299
373
|
|
374
|
+
Extra params:
|
375
|
+
|
376
|
+
Check offcial docs: https://bigmodel.cn/dev/api/normal-model/glm-4
|
377
|
+
|
378
|
+
```ini
|
379
|
+
# true or false
|
380
|
+
DO_SAMPLE=
|
381
|
+
```
|
382
|
+
|
300
383
|
#### Chutes
|
301
384
|
|
302
385
|
```ini
|
@@ -321,6 +404,16 @@ API_KEY=
|
|
321
404
|
MODEL=DeepSeek-V3-0324
|
322
405
|
```
|
323
406
|
|
407
|
+
Only a few models support tool call as below:
|
408
|
+
|
409
|
+
- Meta-Llama-3.1-8B-Instruct
|
410
|
+
- Meta-Llama-3.1-405B-Instruct
|
411
|
+
- Meta-Llama-3.3-70B-Instruct
|
412
|
+
- Llama-4-Scout-17B-16E-Instruct
|
413
|
+
- DeepSeek-V3-0324
|
414
|
+
|
415
|
+
See official docs for more detail: https://docs.sambanova.ai/cloud/docs/capabilities/function-calling
|
416
|
+
|
324
417
|
#### ModelScope
|
325
418
|
|
326
419
|
```ini
|
@@ -364,6 +457,45 @@ API_KEY=
|
|
364
457
|
MODEL=command-a-03-2025
|
365
458
|
```
|
366
459
|
|
460
|
+
Check official docs: https://docs.cohere.com/docs/text-gen-quickstart
|
461
|
+
|
462
|
+
Support keys:
|
463
|
+
|
464
|
+
```ini
|
465
|
+
ENVIRONMENT=
|
466
|
+
```
|
467
|
+
|
468
|
+
For private deploy and Azure api, you need to set BASE_URL.
|
469
|
+
|
470
|
+
```ini
|
471
|
+
PROVIDER=cohere
|
472
|
+
API_KEY=
|
473
|
+
MODEL=command-a-03-2025
|
474
|
+
BASE_URL=<YOUR_ENDPOINT>
|
475
|
+
```
|
476
|
+
|
477
|
+
For Bedrock and Sagemaker cohere api, you have to set below keys:
|
478
|
+
|
479
|
+
See https://docs.cohere.com/docs/text-gen-quickstart.
|
480
|
+
|
481
|
+
```ini
|
482
|
+
PROVIDER=cohere-bedrock
|
483
|
+
; PROVIDER=cohere-sagemaker
|
484
|
+
API_KEY=
|
485
|
+
MODEL=command-a-03-2025
|
486
|
+
|
487
|
+
AWS_REGION=xx
|
488
|
+
AWS_ACCESS_KEY_ID=xx
|
489
|
+
AWS_SECRET_ACCESS_KEY=xx
|
490
|
+
AWS_SESSION_TOKEN=xx
|
491
|
+
```
|
492
|
+
|
493
|
+
Note `MODEL` for Sagemaker should be endpoint name
|
494
|
+
|
495
|
+
```ini
|
496
|
+
MODEL=<YOUR_ENDPOINT_NAME>
|
497
|
+
```
|
498
|
+
|
367
499
|
#### Doubao
|
368
500
|
|
369
501
|
You have to install doubao dependencies, `pip install 'yaicli[doubao]'`
|
@@ -887,6 +1019,83 @@ Thinking:
|
|
887
1019
|
Current directory size: 156M (using du -sh .).
|
888
1020
|
```
|
889
1021
|
|
1022
|
+
### MCP
|
1023
|
+
|
1024
|
+
Add your MCP config in `~/.config/yaicli/mcp.json` (`C:\Users\<user>\.config\yaicli\mcp.json` on Windows.).
|
1025
|
+
|
1026
|
+
`--enable-mcp` option is corresponds to the configuration key `ENABLE_MCP`.
|
1027
|
+
|
1028
|
+
Example:
|
1029
|
+
|
1030
|
+
```shell
|
1031
|
+
ai 'What is the latest exchange rate between the BTC and the US dollar?' --enable-mcp --show-mcp-output
|
1032
|
+
|
1033
|
+
Assistant:
|
1034
|
+
|
1035
|
+
@Mcp call: bing_search({"query": "latest exchange rate between BTC and US dollar"})
|
1036
|
+
╭─ Mcp output ──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
|
1037
|
+
│ [ │
|
1038
|
+
│ { │
|
1039
|
+
│ "id": "result_1751024997243_0", │
|
1040
|
+
│ "title": "BTC to USD - Bitcoin to US Dollar Conversion - Exchange Rates", │
|
1041
|
+
│ "link": "https://www.exchange-rates.org/converter/btc-usd", │
|
1042
|
+
│ "snippet": "11 小时之前 · 1 Bitcoin = 107,304 US Dollars as of June 27, 2025 03:00 AM UTC. You can get live exchange │
|
1043
|
+
│ rates between Bitcoin and US Dollars using exchange-rates.org, which aggregates …" │
|
1044
|
+
│ }, │
|
1045
|
+
│ { │
|
1046
|
+
│ "id": "result_1751024997245_1", │
|
1047
|
+
│ "title": "Live Bitcoin to US Dollars Exchange Rate - ₿ 1 …", │
|
1048
|
+
│ "link": "https://btc.currencyrate.today/usd", │
|
1049
|
+
│ "snippet": ".b_imgcap_altitle p strong,.b_imgcap_altitle .b_factrow strong{color:#767676}#b_results │
|
1050
|
+
│ .b_imgcap_altitle{line-height:22px}.b_hList img{display:block}..." │
|
1051
|
+
│ }, │
|
1052
|
+
│ { │
|
1053
|
+
│ "id": "result_1751024997246_2", │
|
1054
|
+
│ "title": "1 BTC to USD - Bitcoins to US Dollars Exchange Rate - Xe", │
|
1055
|
+
│ "link": "https://www.xe.com/currencyconverter/convert/?From=BTC&To=USD", │
|
1056
|
+
│ "snippet": "2025年6月15日 · Get the latest 1 Bitcoin to US Dollar rate for FREE with the original Universal Currency │
|
1057
|
+
│ Converter. Set rate alerts for to and learn more about Bitcoins and US Dollars from …" │
|
1058
|
+
│ }, │
|
1059
|
+
│ { │
|
1060
|
+
│ "id": "result_1751024997246_3", │
|
1061
|
+
│ "title": "BTC to USD Exchange Rates | Best Exchange Rates", │
|
1062
|
+
│ "link": "https://bestexchangerates.com/rates/btc-to-usd", │
|
1063
|
+
│ "snippet": "Bitcoin (BTC) to US dollar (USD) market data - latest interbank exchange rate, trend, chart & historic │
|
1064
|
+
│ rates. Sell BTC → Buy USD" │
|
1065
|
+
│ }, │
|
1066
|
+
│ { │
|
1067
|
+
│ "id": "result_1751024997247_4", │
|
1068
|
+
│ "title": "BTC to USD | Bitcoin to US Dollar - Investing.com", │
|
1069
|
+
│ "link": "https://www.investing.com/crypto/bitcoin/btc-usd", │
|
1070
|
+
│ "snippet": "Bitcoin Eyes 120k as Fed Rate Cuts Hopes Rise, US Dollar Falls to Multi-Year Lows BTC hovers around │
|
1071
|
+
│ 107.5k after attempts at 108k Fed rate cut optimism rises USD falls to its lowest level …" │
|
1072
|
+
│ } │
|
1073
|
+
│ ] │
|
1074
|
+
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
1075
|
+
Here are some current exchange rates for Bitcoin (BTC) to US Dollar (USD):
|
1076
|
+
|
1077
|
+
1 Exchange-Rates.org:
|
1078
|
+
₿1 Bitcoin = 💵107,304 US Dollars (as of June 27, 2025, 03:00 AM UTC).
|
1079
|
+
Link
|
1080
|
+
2 BTC.CurrencyRate.Today:
|
1081
|
+
Live Bitcoin to US Dollars exchange rate.
|
1082
|
+
Link
|
1083
|
+
3 Xe.com:
|
1084
|
+
Latest conversion rate and information about Bitcoin to US Dollars.
|
1085
|
+
Link
|
1086
|
+
4 BestExchangeRates.com:
|
1087
|
+
Current BTC to USD market data, including charts and historic rates.
|
1088
|
+
Link
|
1089
|
+
5 Investing.com:
|
1090
|
+
Bitcoin price analysis and live BTC to USD updates.
|
1091
|
+
Link
|
1092
|
+
|
1093
|
+
For the most accurate and up-to-date rate, I recommend checking one of these sources directly.
|
1094
|
+
```
|
1095
|
+
|
1096
|
+

|
1097
|
+
|
1098
|
+
|
890
1099
|
## 💻 Technical Details
|
891
1100
|
|
892
1101
|
### Architecture
|