miaoshouai / miaoshouai-assistant

MiaoshouAI Assistant for Automatic1111 Webui
Apache License 2.0
314 stars 25 forks source link

Can openai gpt-turbo-3.5 be supported? #51

Open jacky68147527 opened 1 year ago

jacky68147527 commented 1 year ago
response = openai.Completion.create(
                engine="text-davinci-003",
                prompt=f"translate the following text into English:\n{main_prompt}",
                max_tokens=max_tokens,
                n=1,
                stop=None,
                temperature=0.5,
            )

change to

response = openai.ChatCompletion.create(
        model="gpt-3.5-turbo",
        messages=[
                {"role": "system", "content": "translate the following text into English:\n"},
                {"role": "user", "content": main_prompt},
            ]
        )