Skip to main content

通过ollama提供的接口,将你的nonebot连接到本地部署的基于ollama框架的模型

Project description

功能介绍

通过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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_ollama-0.2.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_ollama-0.2.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_ollama-0.2.2.tar.gz.

File metadata

  • Download URL: nonebot_plugin_ollama-0.2.2.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.4

File hashes

Hashes for nonebot_plugin_ollama-0.2.2.tar.gz
Algorithm Hash digest
SHA256 67071fd9c577bc378336a7e76180fdb239493e1725bdc1c7ae408cf1ae604b8f
MD5 f97d060b2c7f732a85a09f1137e545ce
BLAKE2b-256 847173b3377f7b9110aadcbb8487ad973018acf0f60851c3eddbdc4adb8f85bd

See more details on using hashes here.

File details

Details for the file nonebot_plugin_ollama-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_ollama-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 359e0ea0d72b05c574702b8d33f809e3b54489c78b44fdb37e6a71c791a226eb
MD5 f24fe92ab76ddd7343d99c3eba098b90
BLAKE2b-256 313ef81cd04bda8ce66070fd1c0de42500fe4b24048348fb6964b2c96cfba1d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page