百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

npcpy

> AI 编程
开源

用于 NLP、多模态 LLM、智能体、ML、知识图谱等领域的研究和开发的 Python 库。

1.5K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于 NLP、多模态 LLM、智能体、ML、知识图谱等领域的研究和开发的 Python 库。

# npcpy

`npcpy` 是一款库,为多模态语言模型、代理式 AI 和知识图谱的研究和开发提供了关键的基础模块。其灵活的框架使得开发强大的 AI 应用变得更加容易,支持本地 (如 `ollama`、`LLaMA.cpp`、`omlx`、`LM Studio`) 和云提供商。通过 NPC Context-Agent-Tool 数据层构建多代理团队,并简化上下文工程,该数据层通过软件而不是提示来确保符合性。 ```bash pip install npcpy ``` ## 简单示例 ### 创建和使用角色 ```python from npcpy import NPC

simon = NPC( name='Simon Bolivar', primary_directive=''' Liberate South America from the Spanish Royalists. ''', model='qwen3.5:9b', provider='ollama' ) response = simon.get_llm_response("What is the most important territory to retain in the Andes?") print(response['response'])

…

### 直接调用 LLM
```python
from npcpy import get_llm_response

response = get_llm_response("Who was the celtic god that helped cuchulainn in his time of need as the forces of medb descended upon the men of ulster?", model='gemma4:31b', provider='ollama')
print(response['response'])
Cú Chulainn was primarily aided by his divine father, the god Lugh, and his foster-father, the warrior-god Fergus mac Róich, as well as the magical support of his teacher Scáthach.

使用 OrcaRouter 尝试 15 个不同提供商的近 200 种不同模型,请使用我们的 推荐链接!

Issues· 4 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Pythonagentsaillmmcp

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类AI 编程
定价开源

> 相关工具

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.