langchain icon indicating copy to clipboard operation
langchain copied to clipboard

getting error: while implementing chatopenai module with gpt-4-0613

Open siddhant01 opened this issue 1 year ago • 1 comments

System Info

ubuntu python 3.10.16 langchain 0.0.200

Who can help?

No response

Information

  • [ ] The official example notebooks/scripts
  • [ ] My own modified scripts

Related Components

  • [ ] LLMs/Chat Models
  • [ ] Embedding Models
  • [ ] Prompts / Prompt Templates / Prompt Selectors
  • [ ] Output Parsers
  • [ ] Document Loaders
  • [ ] Vector Stores / Retrievers
  • [ ] Memory
  • [ ] Agents / Agent Executors
  • [ ] Tools / Toolkits
  • [ ] Chains
  • [ ] Callbacks/Tracing
  • [ ] Async

Reproduction

ChatOpenAI( model_name="gpt-4-0613", temperature=self.temperature, model_kwargs={ "frequency_penalty": self.frequency_penalty, "top_p": self.top_p, "headers": conf.PORTKEY_HEADERS, "user": user_id, }, max_tokens=self.max_tokens, )

we get error Error - Unknown model: gpt-4-0613. Please provide a valid OpenAI model name.Known models are: gpt-4, gpt-4-0314, gpt-4-32k, gpt-4-32k-0314, gpt-3.5-turbo, gpt-3.5-turbo-0301, text-ada-001, ada, text-babbage-001, babbage, text-curie-001, curie, davinci, text-davinci-003, text-davinci-002, code-davinci-002, code-davinci-001, code-cushman-002, code-cushman-001.

Expected behavior

it should work

siddhant01 avatar Jun 14 '23 06:06 siddhant01

image You can try to add 0613 model in langchain openai.py

llmadd avatar Jun 15 '23 06:06 llmadd

Hi, @siddhant01! I'm Dosu, and I'm here to help the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

From what I understand, you were experiencing an error while using the chatopenai module with gpt-4-0613. The error message indicated that the model name is unknown and provided a list of valid model names. Another user named llmadd suggested trying to add the 0613 model in langchain openai.py, which could potentially resolve the issue.

Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.

Thank you for your understanding and contribution to the LangChain project! Let us know if you have any further questions or concerns.

dosubot[bot] avatar Sep 14 '23 16:09 dosubot[bot]