(fix) proxy + docs: use openai.chat.completions.create instead of openai.ChatCompletions

This commit is contained in:
ishaan-jaff 2023-11-13 08:24:24 -08:00
parent 60770e1eec
commit cf0ab7155e
10 changed files with 20 additions and 21 deletions

View file

@ -4,7 +4,7 @@ openai.api_key = "this can be anything"
print("making request")
api_key = ""
response = openai.ChatCompletion.create(
response = openai.chat.completions.create(
model = "openrouter/google/palm-2-chat-bison",
messages = [
{
@ -20,7 +20,7 @@ response = openai.ChatCompletion.create(
print(response)
response = openai.ChatCompletion.create(
response = openai.chat.completions.create(
model = "openrouter/google/palm-2-chat-bison",
messages = [
{