Spaces:
Runtime error
Runtime error
Update app.py
Browse files3 unmodified lines456789101112131415168 unmodified lines252627283 unmodified linesos.environ[ "http_proxy" ] = "http://localhost:7890"os.environ[ "https_proxy" ] = "http://localhost:7890"openai.api_key = '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'消息 = [{ "role" : "system" , "content" : "你是一个乐于助人、善良的 AI 小助手。" },]def ChatGPT_Bot(输入):如果输入:messages.append({ “角色”:“用户”,“内容”:输入})聊天 = openai.ChatCompletion.create(8 unmodified linesgr.Interface(fn=ChatGPT_Bot, inputs=inputs, outputs=outputs, title= "ChatGPT人工智能助手" ,description= "我是您的AI助理,您可以问任何您想知道的问题" ,主题=gr.themes.Default()).launch(share= True )3 unmodified lines456789101112131415168 unmodified lines252627283 unmodified linesos.environ[ "http_proxy" ] = "http://localhost:7890"os.environ[ "https_proxy" ] = "http://localhost:7890"openai.api_key = 'OPENAI_API_KEY'消息 = [{ "role" : "system" , "content" : "你是一个乐于助人、善良的 AI 小助手。" },]def ChatGPT_Bot(输入):如果输入:messages.append({ “角色”:“用户”,“内容”:输入})聊天 = openai.ChatCompletion.create(8 unmodified linesgr.Interface(fn=ChatGPT_Bot, inputs=inputs, outputs=outputs, title= "ChatGPT人工智能助手" ,description= "我是您的AI助理,您可以问任何您想知道的问题" ,主题=gr.themes.Default().launch(share= True )
app.py+3-3