TypeError: string indices must be integers, not 'str'
ZhiminHeGit opened this issue · 2 comments
Line 152 in d209845
added print( _tool, type(_tool)) on the previous line for debugging and got " Wikipedia <class 'str'>". it shows _tool is a str , not a dictionary as expected.
was following the examples in api.MD. the code for creating assistant is here:
print(requests.post('http://127.0.0.1:8100/assistants', json={
"name": "bar",
"config": {"configurable": {
"type": "agent",
"type==agent/agent_type": "GPT 3.5 Turbo",
"type==agent/system_message": "You are a helpful assistant",
"type==agent/tools": ["Wikipedia"]
}},
"public": True
}, cookies= {"opengpts_user_id": "foo"}).content)
tools passed in from line 138 is ['Wikipedia'], is a list containing string, rather than type Tool