Skip to content

openai.ChatCompletion, is no longer supported in openai>=1.0.0 #1

@andysingal

Description

@andysingal
MODEL = "gpt-3.5-turbo-16k"

full_dict_response = openai.ChatCompletion.create(
    model=MODEL,
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": gpt_prompt},
    ],
    temperature=0,
)

text_generation = full_dict_response["choices"][0]["message"]["content"]

print(text_generation)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions