You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def get_completion(prompt, model="gpt-4o-mini", temperature=0):
messages = [{"role": "user", "content": prompt}]
response = client.chat.completions.create(
model=model,
messages=messages,
temperature=temperature, # this is the degree of randomness of the model's output
)
return response.choices[0].message.content
get_completion("tell me a joke", temperature = 1, model="gpt-4o-mini")
Screenshots 截图
每次都返回同样的结果,gpt-3.5-turbo 会返回不同结果
The text was updated successfully, but these errors were encountered:
Describe the bug 描述bug
免费api key中的 gpt-4o-mini 模型 temperature 参数失效
To Reproduce 复现方法
Steps to reproduce the behavior:
from openai import OpenAI
client = OpenAI(
# fill in your own API key here
api_key= ...,
base_url="https://api.chatanywhere.org/v1"
)
def get_completion(prompt, model="gpt-4o-mini", temperature=0):
messages = [{"role": "user", "content": prompt}]
response = client.chat.completions.create(
model=model,
messages=messages,
temperature=temperature, # this is the degree of randomness of the model's output
)
return response.choices[0].message.content
get_completion("tell me a joke", temperature = 1, model="gpt-4o-mini")
Screenshots 截图
每次都返回同样的结果,gpt-3.5-turbo 会返回不同结果
The text was updated successfully, but these errors were encountered: