[Question]: Fail to access model (deepseek-r1:70b). ERROR: string indices must be integers.
Describe your problem
Fail to access model (deepseek-r1:70b). ERROR: string indices must be integers. I encountered this error while loading the deepseek-r1 model in Ollama. How can I fix it?
Could you elaberate on how to reproduce it?
I encountered the error "string indices must be integers" and resolved it by debugging the source code. The root cause was an incorrect format for the "variables" parameter. Here's a breakdown:
The error occurred because the "variables" parameter was not provided as an array of objects with the required structure. The correct format should be: [{"key": "knowledge", "optional": true}]
Solution: Ensure the "variables" parameter follows the exact structure: "variables": [ { "key": "knowledge", "optional": true } ]
@KevinHuSh Suggestion: Improve the error logging in future versions to explicitly indicate parameter format issues instead of generic Python errors like "string indices must be integers". This would make it easier for users.