yaicli 0.5.8__py3-none-any.whl → 0.6.0__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yaicli
3
- Version: 0.5.8
3
+ Version: 0.6.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,22 +208,31 @@ 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,chatgpt,cli,gpt,interact,interact with chatgpt,interact with gpt,interact with llm,interact with llms,interact with openai,interactive,llm,llms,openai,terminal
212
- Classifier: License :: OSI Approved :: MIT 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
212
+ Classifier: License :: OSI Approved :: Apache Software License
213
213
  Classifier: Operating System :: OS Independent
214
214
  Classifier: Programming Language :: Python :: 3
215
215
  Requires-Python: >=3.9
216
- Requires-Dist: click<8.2.0
216
+ Requires-Dist: click>=8.1.8
217
217
  Requires-Dist: distro>=1.9.0
218
218
  Requires-Dist: httpx>=0.28.1
219
219
  Requires-Dist: instructor>=1.7.9
220
220
  Requires-Dist: json-repair>=0.44.1
221
- Requires-Dist: litellm>=1.67.5
222
221
  Requires-Dist: openai>=1.76.0
223
222
  Requires-Dist: prompt-toolkit>=3.0.50
224
223
  Requires-Dist: rich>=13.9.4
225
224
  Requires-Dist: socksio>=1.0.0
226
- Requires-Dist: typer>=0.15.2
225
+ Requires-Dist: typer>=0.16.0
226
+ Provides-Extra: all
227
+ Requires-Dist: cohere>=5.15.0; extra == 'all'
228
+ Requires-Dist: ollama>=0.5.1; extra == 'all'
229
+ Requires-Dist: volcengine-python-sdk>=3.0.15; extra == 'all'
230
+ Provides-Extra: cohere
231
+ Requires-Dist: cohere>=5.15.0; extra == 'cohere'
232
+ Provides-Extra: doubao
233
+ Requires-Dist: volcengine-python-sdk>=3.0.15; extra == 'doubao'
234
+ Provides-Extra: ollama
235
+ Requires-Dist: ollama>=0.5.1; extra == 'ollama'
227
236
  Description-Content-Type: text/markdown
228
237
 
229
238
  # YAICLI: Your AI assistant in command line.
@@ -308,6 +317,38 @@ pipx install yaicli
308
317
  uv tool install yaicli
309
318
  ```
310
319
 
320
+ Yaicli has several optional dependencies group, you can copy below commands to install specific dependencies.
321
+
322
+ ```shell
323
+ # install all denpendencies
324
+ pip install 'yaicli[all]'
325
+
326
+ # install with ollama support
327
+ pip instsall 'yaicli[ollama]'
328
+
329
+ # install with cohere support
330
+ pip install 'yaicli[cohere]'
331
+
332
+ # install with doubao support
333
+ pip install 'yaicli[doubao]'
334
+ ```
335
+
336
+ Install by `uv`.
337
+
338
+ ```shell
339
+ # install all denpendencies
340
+ uv tool install 'yaicli[all]'
341
+
342
+ # install with ollama support
343
+ uv tool instsall 'yaicli[ollama]'
344
+
345
+ # install with cohere support
346
+ uv tool install 'yaicli[cohere]'
347
+
348
+ # install with doubao support
349
+ uv tool install 'yaicli[doubao]'
350
+ ```
351
+
311
352
  ### Install from Source
312
353
 
313
354
  ```bash
@@ -382,39 +423,41 @@ SHOW_FUNCTION_OUTPUT=true
382
423
 
383
424
  ### Configuration Options Reference
384
425
 
385
- | Option | Description | Default | Env Variable |
386
- | ---------------------- | ------------------------------------------- | --------------------------- | -------------------------- |
387
- | `PROVIDER` | LLM provider (openai, claude, cohere, etc.) | `openai` | `YAI_PROVIDER` |
388
- | `BASE_URL` | API endpoint URL | `https://api.openai.com/v1` | `YAI_BASE_URL` |
389
- | `API_KEY` | Your API key | - | `YAI_API_KEY` |
390
- | `MODEL` | LLM model to use | `gpt-4o` | `YAI_MODEL` |
391
- | `SHELL_NAME` | Shell type | `auto` | `YAI_SHELL_NAME` |
392
- | `OS_NAME` | Operating system | `auto` | `YAI_OS_NAME` |
393
- | `STREAM` | Enable streaming | `true` | `YAI_STREAM` |
394
- | `TIMEOUT` | API timeout (seconds) | `60` | `YAI_TIMEOUT` |
395
- | `EXTRA_HEADERS` | Extra headers | - | `YAI_EXTRA_HEADERS` |
396
- | `EXTRA_BODY` | Extra body | - | `YAI_EXTRA_BODY` |
397
- | `REASONING_EFFORT` | Reasoning effort | - | `YAI_REASONING_EFFORT` |
398
- | `INTERACTIVE_ROUND` | Interactive mode rounds | `25` | `YAI_INTERACTIVE_ROUND` |
399
- | `CODE_THEME` | Syntax highlighting theme | `monokai` | `YAI_CODE_THEME` |
400
- | `TEMPERATURE` | Response randomness | `0.7` | `YAI_TEMPERATURE` |
401
- | `TOP_P` | Top-p sampling | `1.0` | `YAI_TOP_P` |
402
- | `MAX_TOKENS` | Max response tokens | `1024` | `YAI_MAX_TOKENS` |
403
- | `MAX_HISTORY` | Max history entries | `500` | `YAI_MAX_HISTORY` |
404
- | `AUTO_SUGGEST` | Enable history suggestions | `true` | `YAI_AUTO_SUGGEST` |
405
- | `SHOW_REASONING` | Enable reasoning display | `true` | `YAI_SHOW_REASONING` |
406
- | `JUSTIFY` | Text alignment | `default` | `YAI_JUSTIFY` |
407
- | `CHAT_HISTORY_DIR` | Chat history directory | `<tempdir>/yaicli/chats` | `YAI_CHAT_HISTORY_DIR` |
408
- | `MAX_SAVED_CHATS` | Max saved chats | `20` | `YAI_MAX_SAVED_CHATS` |
409
- | `ROLE_MODIFY_WARNING` | Warn user when modifying role | `true` | `YAI_ROLE_MODIFY_WARNING` |
410
- | `ENABLE_FUNCTIONS` | Enable function calling | `true` | `YAI_ENABLE_FUNCTIONS` |
411
- | `SHOW_FUNCTION_OUTPUT` | Show function output in response | `true` | `YAI_SHOW_FUNCTION_OUTPUT` |
426
+ | Option | Description | Default | Env Variable |
427
+ | ---------------------- | ------------------------------------------- | ------------------------ | -------------------------- |
428
+ | `PROVIDER` | LLM provider (openai, claude, cohere, etc.) | `openai` | `YAI_PROVIDER` |
429
+ | `BASE_URL` | API endpoint URL | - | `YAI_BASE_URL` |
430
+ | `API_KEY` | Your API key | - | `YAI_API_KEY` |
431
+ | `MODEL` | LLM model to use | `gpt-4o` | `YAI_MODEL` |
432
+ | `SHELL_NAME` | Shell type | `auto` | `YAI_SHELL_NAME` |
433
+ | `OS_NAME` | Operating system | `auto` | `YAI_OS_NAME` |
434
+ | `STREAM` | Enable streaming | `true` | `YAI_STREAM` |
435
+ | `TIMEOUT` | API timeout (seconds) | `60` | `YAI_TIMEOUT` |
436
+ | `EXTRA_HEADERS` | Extra headers | - | `YAI_EXTRA_HEADERS` |
437
+ | `EXTRA_BODY` | Extra body | - | `YAI_EXTRA_BODY` |
438
+ | `REASONING_EFFORT` | Reasoning effort | - | `YAI_REASONING_EFFORT` |
439
+ | `INTERACTIVE_ROUND` | Interactive mode rounds | `25` | `YAI_INTERACTIVE_ROUND` |
440
+ | `CODE_THEME` | Syntax highlighting theme | `monokai` | `YAI_CODE_THEME` |
441
+ | `TEMPERATURE` | Response randomness | `0.7` | `YAI_TEMPERATURE` |
442
+ | `TOP_P` | Top-p sampling | `1.0` | `YAI_TOP_P` |
443
+ | `MAX_TOKENS` | Max response tokens | `1024` | `YAI_MAX_TOKENS` |
444
+ | `MAX_HISTORY` | Max history entries | `500` | `YAI_MAX_HISTORY` |
445
+ | `AUTO_SUGGEST` | Enable history suggestions | `true` | `YAI_AUTO_SUGGEST` |
446
+ | `SHOW_REASONING` | Enable reasoning display | `true` | `YAI_SHOW_REASONING` |
447
+ | `JUSTIFY` | Text alignment | `default` | `YAI_JUSTIFY` |
448
+ | `CHAT_HISTORY_DIR` | Chat history directory | `<tempdir>/yaicli/chats` | `YAI_CHAT_HISTORY_DIR` |
449
+ | `MAX_SAVED_CHATS` | Max saved chats | `20` | `YAI_MAX_SAVED_CHATS` |
450
+ | `ROLE_MODIFY_WARNING` | Warn user when modifying role | `true` | `YAI_ROLE_MODIFY_WARNING` |
451
+ | `ENABLE_FUNCTIONS` | Enable function calling | `true` | `YAI_ENABLE_FUNCTIONS` |
452
+ | `SHOW_FUNCTION_OUTPUT` | Show function output in response | `true` | `YAI_SHOW_FUNCTION_OUTPUT` |
412
453
 
413
454
  ### LLM Provider Configuration
414
455
 
415
456
  YAICLI works with all major LLM providers. The default configuration is set up for OpenAI, but you can easily switch to
416
457
  other providers.
417
458
 
459
+ Note: blank `BASE_URL` (or no `BASE_URL`) means use provider default url.
460
+
418
461
  #### Pre-configured Provider Settings
419
462
 
420
463
  | Provider | BASE_URL |
@@ -430,7 +473,7 @@ other providers.
430
473
  > - Google Gemini: https://ai.google.dev/gemini-api/docs/openai
431
474
  > - Claude: https://docs.anthropic.com/en/api/openai-sdk
432
475
 
433
- If you not sure about base_url or just use the default provider base_url, just leave it blank.
476
+ If you not sure about base_url or just use the default provider base_url, just leave it blank or delete `BASE_URL`.
434
477
 
435
478
  ```ini
436
479
  [core]
@@ -440,6 +483,169 @@ API_KEY=xxx
440
483
  MODEL=command-r-plus
441
484
  ```
442
485
 
486
+ #### Openai
487
+
488
+ Yaicli use `openai` as provider as default provider, `gpt-4o` as default model, you can add your api key to use as it is.
489
+
490
+ ```ini
491
+ PROVIDER=openai
492
+ BASE_URL=
493
+ API_KEY=
494
+ MODEL=gpt-4o
495
+ ```
496
+
497
+ #### Deepseek
498
+
499
+ ```ini
500
+ PROVIDER=deepseek
501
+ API_KEY=
502
+ MODEL=deepseek-chat
503
+ ```
504
+
505
+ #### OpenRouter
506
+
507
+ ```ini
508
+ PROVIDER=openrouter
509
+ API_KEY=
510
+ MODEL=deepseek/deepseek-chat-v3-0324
511
+ ```
512
+
513
+ #### Groq
514
+
515
+ ```ini
516
+ PROVIDER=groq
517
+ API_KEY=
518
+ MODEL=llama-3.3-70b-versatile
519
+ ```
520
+
521
+ #### Chatglm
522
+
523
+ ```ini
524
+ PROVIDER=chatglm
525
+ API_KEY=
526
+ MODEL=glm-4-plus
527
+ ```
528
+
529
+ #### Chutes
530
+
531
+ ```ini
532
+ PROVIDER=chutes
533
+ API_KEY=
534
+ MODEL=deepseek-ai/DeepSeek-V3-0324
535
+ ```
536
+
537
+ #### AI21
538
+
539
+ ```ini
540
+ PROVIDER=ai21
541
+ API_KEY=
542
+ MODEL=jamba-large-1.6
543
+ ```
544
+
545
+ #### Sambanova
546
+
547
+ ```ini
548
+ PROVIDER=sambanova
549
+ API_KEY=
550
+ MODEL=DeepSeek-V3-0324
551
+ ```
552
+
553
+ #### ModelScope
554
+
555
+ ```ini
556
+ PROVIDER=modelscope
557
+ API_KEY=
558
+ MODEL=deepseek-ai/DeepSeek-V3-0324
559
+ ```
560
+
561
+ #### Inifiniai
562
+
563
+ ```ini
564
+ PROVIDER=infiniai
565
+ ; BASE_URL=https://cloud.infini-ai.com/maas/v1
566
+ API_KEY=
567
+ MODEL=deepseek-v3
568
+ ```
569
+
570
+ #### Siliconflow
571
+
572
+ ```ini
573
+ PROVIDER=siliconflow
574
+ API_KEY=
575
+ MODEL=Qwen/Qwen3-32B
576
+ ```
577
+
578
+ #### Yi
579
+
580
+ ```ini
581
+ PROVIDER=yi
582
+ API_KEY=
583
+ MODEL=yi-lightning
584
+ ```
585
+
586
+ #### Cohere
587
+
588
+ You have to install cohere dependencies, `pip install 'yaicli[cohere]'`
589
+
590
+ ```ini
591
+ PROVIDER=cohere
592
+ API_KEY=
593
+ MODEL=command-a-03-2025
594
+ ```
595
+
596
+ #### Doubao
597
+
598
+ You have to install doubao dependencies, `pip install 'yaicli[doubao]'`
599
+
600
+ Use doubao OpenAI compatible api, you can just set `API_KEY`.
601
+
602
+ ```ini
603
+ PROVIDER=doubao
604
+ API_KEY=
605
+ MODEL=doubao-1-5-lite-32k-250115
606
+ ```
607
+
608
+ If you are using access key, you have to set `AK` and `SK`.
609
+
610
+ ```ini
611
+ PROVIDER=doubao
612
+ MODEL=doubao-1-5-lite-32k-250115
613
+ AK=XXX
614
+ SK=XXX
615
+ ```
616
+
617
+ #### Ollama
618
+
619
+ You have to install ollama dependencies, `pip install 'yaicli[ollama]'`
620
+
621
+ ```ini
622
+ PROVIDER=ollama
623
+ ; BASE_URL=http://localhost:11434
624
+ MODEL=qwen3:32b
625
+ ```
626
+
627
+ Support options:
628
+
629
+ ```ini
630
+ TEMPERATURE=
631
+ TOP_P=
632
+ SEED=
633
+ NUM_PREDICT=
634
+ NUM_CTX=
635
+ NUM_BATCH=
636
+ NUM_GPU=
637
+ MAIN_GPU=
638
+ LOW_VRAM=
639
+ F16_KV=
640
+ LOGITS_ALL=
641
+ VOCAB_ONLY=
642
+ USE_MMAP=
643
+ USE_MLOCK=
644
+ NUM_THREAD=
645
+ ```
646
+
647
+ NOTE: Ollama provider not support extra body
648
+
443
649
  ### Syntax Highlighting Themes
444
650
 
445
651
  YAICLI supports all Pygments syntax highlighting themes. You can set your preferred theme in the config file:
@@ -0,0 +1,41 @@
1
+ pyproject.toml,sha256=vPeQggLMvO9RDn7BRhQjn5sAf0HyANCd0CFkLZ0a_uE,2434
2
+ yaicli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ yaicli/chat.py,sha256=_emvZEdgMBth2nQGaNWPf0P45oW2k3bpuIwqsxFcM5A,13676
4
+ yaicli/cli.py,sha256=YUKbtvRcNbe6iTmm0dx-38QDzzrAP4cOYaOChxpJ2wg,23673
5
+ yaicli/config.py,sha256=HrWYcelLXE61XX719eVcuuo3292xxf1BNQznWdvjQFQ,6535
6
+ yaicli/console.py,sha256=vARPJd-3lafutsQWrGntQVjLrYqaJD3qisN82pmuhjU,1973
7
+ yaicli/const.py,sha256=jC01jLLuuYJ7K_QaekXkIN7j1bIKCoGwJeTpquJy55Q,8178
8
+ yaicli/entry.py,sha256=Q1eqLE7tcHide7ooyPO7OCJpKE2YVuxR-NNFA2Pt2Hw,8693
9
+ yaicli/exceptions.py,sha256=WBYg8OTJJzaj7lt6HE7ZyBoe5T6A3yZRNCRfWd4iN0c,372
10
+ yaicli/history.py,sha256=s-57X9FMsaQHF7XySq1gGH_jpd_cHHTYafYu2ECuG6M,2472
11
+ yaicli/printer.py,sha256=g1TS7aDSQlWlSrQRhvNhNqoQKlsaf1lVOyUSK6LQLNQ,7945
12
+ yaicli/render.py,sha256=k8o2P8fI44PJlyQbs7gmMiu2x2prwajdWn5JIt15BIA,505
13
+ yaicli/role.py,sha256=PfwiVJIlzg7EzlvMM-kIy6vBK0d5d_J4M1I_fIZGnWk,7399
14
+ yaicli/schemas.py,sha256=Ty2ybCvld-ritgBZoI3RR93vYfw9LUNqkR8xk8VRZ2A,762
15
+ yaicli/tools.py,sha256=xw8KEs_xlSf79A2Aq1rAsUWahS6A_e5QMLt7QDXL5bs,5086
16
+ yaicli/utils.py,sha256=bpo3Xhozpxsaci3FtEIKZ32l4ZdyWMsrHjYGX0tB4J4,4541
17
+ yaicli/functions/__init__.py,sha256=_FJooQ9GkijG8xLwuU0cr5GBrGnC9Nc6bnCeUjrsT0k,1271
18
+ yaicli/functions/buildin/execute_shell_command.py,sha256=unl1-F8p6QZajeHdA0u5UpURMJM0WhdWMUWCCCHVRcI,1320
19
+ yaicli/llms/__init__.py,sha256=cN54nu-YalZipXjLW0YAAe0rRv0tXAQ8lLi1ohuTpao,363
20
+ yaicli/llms/client.py,sha256=mkE9KHSuPcJfpNQXbzF2YXGkel3jrOW8KfQ3YYpaK4M,4453
21
+ yaicli/llms/provider.py,sha256=gRPMVC_gTmR1-zm65ErmO5mZWr3HFcexQIEgEQvpymo,2820
22
+ yaicli/llms/providers/ai21_provider.py,sha256=kOXGuxh1tu-G1MbxSWnDLFDE8gP73YvM7G6i7K5WzbM,2744
23
+ yaicli/llms/providers/chatglm_provider.py,sha256=Oa9cQTF1x2durkfqNwO2LbC_ofr-8lVRrf63vINxPxY,6232
24
+ yaicli/llms/providers/chutes_provider.py,sha256=JYStbkf5RqamcAjWkz9S9WtlDsK5gUtpCxCqm6_A1x4,207
25
+ yaicli/llms/providers/cohere_provider.py,sha256=hc6vQxbCHz9kM2tNKK-kGkuOf4-gkskXW9ctr9V4Cxk,10837
26
+ yaicli/llms/providers/deepseek_provider.py,sha256=1-ucumH7gEGmebauuq1AvTfEYLFFIefBRqV7OCg_qAU,411
27
+ yaicli/llms/providers/doubao_provider.py,sha256=hh4VkJYJVwS34Tk2E09zwjoL-ar27X-ldnPg0Q4gemE,1999
28
+ yaicli/llms/providers/groq_provider.py,sha256=ntwZ7qHv1AEiarHw5gUE0o6jJtTdhg03y5PRpSx_mM4,659
29
+ yaicli/llms/providers/infiniai_provider.py,sha256=ftpmf7DJ25RklJX0RptGuyEQT1I5Zat8JE9a8gCm9SI,585
30
+ yaicli/llms/providers/modelscope_provider.py,sha256=ndX59VpVKkYmJJYAfxHrjKkyaoqICpXrbQyQtJMT3LA,427
31
+ yaicli/llms/providers/ollama_provider.py,sha256=pjpYjfnHWnExweZi1KGbT07JGkcxzKPhqICo8dD82D0,6967
32
+ yaicli/llms/providers/openai_provider.py,sha256=9pI0tF1cui2NkoKWIKzdrKDfWaokv-s9yeAi5gydQvY,7521
33
+ yaicli/llms/providers/openrouter_provider.py,sha256=32ZIjbyECecUGhP2iz42UsdHXfm5OT4_Utb62D4RYLI,416
34
+ yaicli/llms/providers/sambanova_provider.py,sha256=tmesO0H6WEieD0EFKKDF2r2w7oPXSAjneuqaMCBCi-s,1302
35
+ yaicli/llms/providers/siliconflow_provider.py,sha256=VxTjjXlbqqNRJ0C-maUOV1Pw-HUDtpbmgFniuppCHHk,419
36
+ yaicli/llms/providers/yi_provider.py,sha256=D8dKLV0mTOPmRkS-Gb59N5u0UWXBJ5ZIfwoaNHM7hvA,205
37
+ yaicli-0.6.0.dist-info/METADATA,sha256=Yh-4suoENNVLljgQFgOZmtJQuIR-xIUV_fxOeDQWCRU,53514
38
+ yaicli-0.6.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
+ yaicli-0.6.0.dist-info/entry_points.txt,sha256=iYVyQP0PJIm9tQnlQheqT435kK_xdGoi5j9aswGV9hA,66
40
+ yaicli-0.6.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
41
+ yaicli-0.6.0.dist-info/RECORD,,