访问Cohere Command R系列模型
项目描述
llm-command-r
通过Cohere API访问Cohere Command R系列模型
安装
在LLM相同的环境中安装此插件。
llm install llm-command-r
配置
您需要一个Cohere API密钥。按照以下方式配置
llm keys set cohere
# Paste key here
使用方法
此插件添加了两个模型。
llm -m command-r 'Say hello from Command R'
llm -m command-r-plus 'Say hello from Command R Plus'
Command R模型具有在回答提示时搜索网络的能力。
您可以使用模型的-o websearch 1
选项启用此功能
llm -m command-r 'What is the LLM CLI tool?' -o websearch 1
搜索的成本更高,因为它涉及到包括搜索结果在内的token消费。
完整的搜索结果以JSON格式存储在LLM日志中。
您还可以使用此插件提供的command-r-search
命令查看作为输出一部分用于回答您问题的文档列表
llm command-r-search 'What is the LLM CLI tool by simonw?'
示例输出
LLM CLI工具是一个命令行实用程序,允许用户访问大型语言模型。它由Simon Willison创建,可以通过pip、Homebrew或pipx安装。该工具支持与远程API和本地安装和运行的模型交互。用户可以从命令行运行提示,甚至可以使用CLI工具构建图像搜索引擎。
来源
- GitHub - simonw/llm: 从命令行访问大型语言模型 - https://github.com/simonw/llm
- llm, ttok和strip-tags——用于与ChatGPT和其他LLM一起工作的CLI工具 - https://simonwillison.net/2023/May/18/cli-tools-for-llms/
- LinkedIn上的Sherwood Callaway:GitHub - simonw/llm:通过命令行访问大型语言模型 - https://www.linkedin.com/posts/sherwoodcallaway_github-simonwllm-access-large-language-activity-7104448041041960960-2WRG
- LLM Python/CLI工具添加了对嵌入的支持 | Hacker News - https://news.ycombinator.com/item?id=37384797
- 用于与ChatGPT和其他LLM工作的CLI工具 | Hacker News - https://news.ycombinator.com/item?id=35994037
- GitHub - simonw/homebrew-llm:用于安装LLM和相关工具的Homebrew公式 - https://github.com/simonw/homebrew-llm
- LLM:用于与大型语言模型交互的CLI实用程序和Python库 - https://llm.datasette.io/en/stable/
- GitHub - simonw/llm-prompts:用于LLM CLI工具的提示集合 - https://github.com/simonw/llm-prompts
- GitHub - simonw/llm-cmd:使用LLM在您的shell中生成和执行命令 - https://github.com/simonw/llm-cmd
开发
要本地设置此插件,首先检出代码。然后创建一个新的虚拟环境
cd llm-command-r
python3 -m venv venv
source venv/bin/activate
现在安装依赖项和测试依赖项
llm install -e '.[test]'
要运行测试
pytest
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。
源分发
llm-command-r-0.2.tar.gz (8.4 kB 查看哈希值)
构建分发
llm_command_r-0.2-py3-none-any.whl (8.7 kB 查看哈希值)
关闭
llm-command-r-0.2.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 621e73799b11bca713e5bdfe73e4890ef19229899e16f9d7bb3149086c3c097a |
|
MD5 | 90adef54131e2e1ff79bfc431185f40e |
|
BLAKE2b-256 | 58ba53c2f6c76b1e5beb92358305f01eb46c372009870276a5c7bc10d4c0f79d |
关闭
llm_command_r-0.2-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b4a562bc89a2798b75201654df523b5c4c05c138a3fe2816e48bf20553cb0240 |
|
MD5 | 883a730d4e3e5e34d9de1096c3bc47b7 |
|
BLAKE2b-256 | af7cb927aeff434ae1e770f44ce7e210d4ca89af701b1175a7af6c6bf8a888e3 |