功能介绍
通过ollama提供的接口, 将你的nonebot连接到本地部署的基于ollama框架的LLM模型。
暂时只支持与单个模型进行纯文本聊天。
主要功能
@nonebot 即可进行对话
手动清空历史记录
@nonebot clear
当前版本:v0.2.0
安装说明
nb-cli
nb plugin install nonebot-plugin-ollama
配置项
#config.py
class ScopedConfig:
model: str = "qwen2.5:0.5b" # 填写所要使用的模型名称
url: str = "http://127.0.0.1:11434/" # 填写ollma所在的地址,形如http://***/
min_priority: int = 5 # 填写优先级,数字越小优先级越高,推荐设置为低优先,
# 该优先级为clear指令优先级,对话优先级为 min_priority+1
max_histories: int = 50 # 填写最大历史对话记录条数
相关链接
nonebot: https://nonebot.dev/
ollama: https://ollama.org.cn/
开源协议
MIT
Metadata
Release files for nonebot-plugin-ollama 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nonebot_plugin_ollama-0.2.3.tar.gz | 3.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nonebot_plugin_ollama-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 kB
Release files / nonebot_plugin_ollama-0.2.3.tar.gz
| Download URL | nonebot_plugin_ollama-0.2.3.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c8a8c33be2ced85d650bbc84c5ec00922cf195a686dbaddb9263afba8842a32
|
|
BLAKE2b-256 checksum How to use checksums |
5af04d21653dce07b66d162a0c865248c9c38c86c2a4ad7857b1127b4a783bb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.4
|
Release files / nonebot_plugin_ollama-0.2.3-py3-none-any.whl
| Download URL | nonebot_plugin_ollama-0.2.3-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d4ea97e1a02e40f0c174732a88969c3dd1472ae5137efdba562d7f90e7389559
|
|
BLAKE2b-256 checksum How to use checksums |
b23132d3eeadf23faa611ae5a6a6c5e4bdec514868a28ca3d1f5b05f4373ec68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.4
|