Closed superfeelapi closed 1 month ago
Issue: API returned unexpected status code: 400 - "you must provide a model parameter."
To resolve this issue, instantiate the Language Model (LLM) with an embedding model option, as demonstrated in the code snippet below:
embeddingModelName := "text-embedding-3-small" // use the model name that you prefer
// Instantiate LLM with embedding model
llm, err := openai.New(openai.WithEmbeddingModel(embeddingModelName))
if err != nil {
log.Fatal(err)
}
e, err := embeddings.NewEmbedder(llm)
if err != nil {
log.Fatal(err)
}
thank you so much @nikhilnarayanan623!
I trying to add documents into Pinecone with the sample code provided in pinecone_test.go file:
But received an error saying: error adding documents: API returned unexpected status code: 400: you must provide a model parameter. Anyone can help? how to provide a model parameter? in which API?