Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ollama使用{'role': 'system','content': '你是一个有用的助手'}会报错 #17

Open
sea5241 opened this issue Mar 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@sea5241
Copy link

sea5241 commented Mar 11, 2025

你好,有个问题帮看一下。
我使用ollama,
配置如下:
api_config = {
"api_base": "http://127.0.0.1:11434/",
"model": "deepseek-r1:14b",
"provider": "ollama",
}
然后启动python3 app.py会提示检查未通过:

itellm.BadRequestError: Invalid Message passed
in {'role': 'system', 'content': '你是一个有用的助手'}

Model invocation cannot be used.

然后我删掉 {'role': 'system', 'content': '你是一个有用的助手'}就可以,
是因为不支持'role': 'system'吗?但是我看 ollama 本身是支持的

@mimo-x mimo-x added the bug Something isn't working label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants