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

TypeError: string indices must be integers, not 'str' #330

Open
ZhiminHeGit opened this issue May 5, 2024 · 2 comments
Open

TypeError: string indices must be integers, not 'str' #330

ZhiminHeGit opened this issue May 5, 2024 · 2 comments

Comments

@ZhiminHeGit
Copy link

if _tool["type"] == AvailableTools.RETRIEVAL:

@ZhiminHeGit
Copy link
Author

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.

@ZhiminHeGit
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant