ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Question]: Fail to access model (deepseek-r1:70b). ERROR: string indices must be integers.

Open chanhoo opened this issue 10 months ago • 1 comments

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?

chanhoo avatar Mar 04 '25 10:03 chanhoo

Could you elaberate on how to reproduce it?

KevinHuSh avatar Mar 05 '25 02:03 KevinHuSh

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.

dickence avatar Mar 27 '25 01:03 dickence