sullivan-sean / chat-langchainjs

https://chat-langchainjs.fly.dev/
290 stars 76 forks source link

How do you configure the specific OpenAI model the app uses? #9

Closed jackson-sandland closed 1 year ago

jackson-sandland commented 1 year ago

Title says it all. I see a lot of references to text-davinci-002 in the generated docstore.json file so it appears this is the model being used but I don't see any references to that model in the repo. If I'd like to use a different model, how would I set that up?

RajSunner commented 1 year ago

Hi, try updating the pages/api/util.ts file and include { modelName : "model-you-want" } as an additional param where new OpenAI(...) is used, which is twice in this case.

Same would apply to wanting to change the embedding model when new OpenAIEmbeddings() is called as part of ingestion.