from openai import OpenAI client = OpenAI( base_url="http://192.168.92.151:3000/api/v1/deployment/proxy/1ce356ff-49d3-48da-a583-46e87c2776da/v1", api_key="sk-1wTkTvsfu0IiyZFhNAx8HMgtIf2TxLGP-DyrcNKYlIc" # 替换为你的 API Key ) response = client.chat.completions.create( model="local-model", messages=[{"role": "user", "content": "你是谁,是哪个模型,详细说一下"}], max_tokens=512, temperature=0.7 ) print(response.choices[0].message.content)