tian-minghui / openai-style-api

支持将openai、claude、azure openai, gemini,kimi, 智谱AI,通义千问,讯飞星火API等模型服务方的调用转为openai方式调用。屏蔽不同大模型API的差异,统一用openai api标准格式使用大模型(Shield the differences between different large model APIs and use large models in a unified openai API standard format)
MIT License
328 stars 55 forks source link

请问,http://localhost:8090/可以打开,遇到这个问题如何解决, openai.error.APIError: Invalid response object from API: 'Internal Server Error' (HTTP response code was 500) #9

Open zxjhellow2 opened 6 months ago

zxjhellow2 commented 6 months ago

import openai

openai.api_key = "7c7aa4a3549f5" openai.api_base = "http://localhost:8090/v1"

completion = openai.ChatCompletion.create( model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Hello world"}]) print(completion.choices[0].message.content)

tian-minghui commented 6 months ago

给下 server端的日志