Closed wbbeyourself closed 1 year ago
Hi @wbbeyourself Thank you for your interest in our work. Sorry for confusiong. It seems like you're facing an issue with the OpenAI keys. In our project, we utilized Azure OpenAI API keys to evaluate the performance of ChatGPT. To fetch the results, we used the openai.Completion.create() function, which is consistent with other models such as code-davinci-002 and text-davinci-003.
However, we observed that for the regular keys, you should refer to the documentation at https://platform.openai.com/docs/api-reference/chat and use openai.ChatCompletion.create() instead. Additionally, for prompt design, please follow the instructions provided in the chatlm tag documentation at https://github.com/openai/openai-python/blob/main/chatml.md#few-shot-prompting. In this case, you will need to place your tag within the message parameter instead of prompt.
During our experiments, we found that the performance of ChatGPT with Azure OpenAI Key is superior to ChatGPT with the regular OpenAI key, and we only reported the best performance in our paper. However, we also consider actively working on updating the standard methods for calling ChatGPT in the regular account. Thanks a lot.
Ok, I got it. I use the regular account/key indeed. Thanks a lot.
bird/llm/src/gpt_request.py
error:This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions?\t----- bird -----\tcalifornia_schools
The origin function:
def connect_gpt(engine, prompt, max_tokens, temperature, stop):
print(prompt)
While gpt-3.5-turbo api call is:
response = openai.ChatCompletion.create( model=engine, messages=[{"role": "user", "content": prompt}], temperature=temperature, stop=stop )