[Bug]: AttributeError: “list’ object has no attribute ‘startswith’”
Is there an existing issue for this?
- I have searched the existing issues and checked the recent builds/commits
What happened?
Executed the following code: import asyncio, json from EdgeGPT.EdgeGPT import Chatbot, ConversationStyle
cookies = json.loads(open("/home/hank/bing_cookies_*.json", encoding="utf-8").read())
async def main(): bot = await Chatbot.create(cookies) # Passing cookies is "optional", as explained above response = await bot.ask(prompt="Hello world", conversation_style=ConversationStyle.creative, simplify_response=True) print(json.dumps(response, indent=2)) # Returns """ { "text": str, "author": str, "sources": list[dict], "sources_text": str, "suggestions": list[str], "messages_left": int } """ await bot.close()
if name == "main": asyncio.run(main())
When I ran it got following error: File "/home/hank/.local/lib/python3.9/site-packages/EdgeGPT/conversation.py", line 86, in create if proxy is not None and proxy.startswith("socks5h://"): AttributeError: “list’ object has no attribute ‘startswith’”
Steps to reproduce the problem
run the script..
What should have happened?
should get print out
Version where the problem happens
Version: 0.12.1
What Python version are you running this with?
3.9
What is your operating system ?
No response
Command Line Arguments
noConsole logs
n/AAdditional information
No response
Source: acheong08/EdgeGPT