Hassassistant / openai_response

Custom component to integrate OpenAI's ChatGPT into Home Assistant
71 stars 15 forks source link

text-davinci-003 has been has been deprecated and openai_response causes OpenAI Conversation not to work #19

Open nirnachmani opened 8 months ago

nirnachmani commented 8 months ago

Two issues: text-davinci-003 has been has been deprecated and shouldn't be used as an example for the integration

Since HA 2024.1 OpenAI Conversation plugin won't load if openai_response is installed with the error:

client = openai.AsyncOpenAI(api_key=entry.data[CONF_API_KEY]) 
AttributeError: module 'openai' has no attribute 'AsyncOpenAI'

May be related to: https://github.com/home-assistant/core/issues/106934

mesut3000 commented 8 months ago

Same here

davidraviv commented 8 months ago

Issue #1: I override it by configuring it manually to a replacement model gpt-3.5-turbo-instruct:

- platform: openai_response
  api_key: !secret chatgpt_api_key
  model: "gpt-3.5-turbo-instruct" # Optional, defaults to "text-davinci-003"
  name: "openai_response" # Optional, defaults to "hassio_openai_response"

I hope it helps.