GitHub·· 3 小时前AI 评分22
simonw/llm:统一调用 OpenAI、Claude、Gemini 等模型的 CLI 工具与 Python 库
simonw/llm
AI 导读
simonw/llm 是一个 CLI 工具兼 Python 库,可对接 OpenAI、Anthropic 的 Claude、Google 的 Gemini、Qwen、Gemma、Kimi、DeepSeek、Mistral 等数十个模型,既支持远程 API,也能运行本地安装的模型。
正文
A CLI tool and Python library for interacting with OpenAI, Anthropic’s Claude, Google’s Gemini, Qwen, Gemma, Kimi, DeepSeek, Mistral, and dozens of other Large Language Models, both via remote APIs and with models that can be installed and run on your own machine.
Use LLM to run prompts or start chats against an arbitrary OpenAI-compatible Chat Completions endpoint, such as LM Studio. With uvx, you can do this without installing LLM first:
You can also install a plugin to access models that can run on your local device. If you use Ollama:
Chatting with gpt-4.1
Type 'exit' or 'quit' to exit
Type '!multi' to enter multiple lines, then '!end' to finish
Type '!edit' to open your default editor and modify the prompt.
Type '!fragment <my_fragment> [<another_fragment> ...]' to insert one or more fragments
> Tell me a joke about a pelican
Why don't pelicans like to tip waiters?
Because they always have a big bill!
来源:GitHub · github.com