[x] Name your Pull Request title clearly, concisely, and prefixed with the name of the primarily affected package you changed according to Good commit messages (such as memory: add interfaces for X, Y or util: add whizzbang helpers).
[x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. Fixes #123).
[x] Describes the source of new concepts.
[x] References existing implementations as appropriate.
This pull request addresses two bugs identified in issue #779:
1. Unexpected Status Code (400) Bug:
Users were encountering a status code 400 error indicating the need to provide a model parameter (openai.WithEmbeddingModel("text-embedding-ada-002")) when constructing the openai type from the openai package. This PR resolves this issue by updating the pinecone_test.go file to include the required model parameter.
2. Unauthorized Response Bug:
After adding documents into Pinecone with the embedding option, users were receiving an unauthorized response. This was due to an incorrect API usage from the WithProjectName() function. Pinecone requires a projectID, not a projectName. The quickest way to fix this is to replace the option of WithProjectName() with WithProjectID(). But I think this construction is redundant when it is used together with WithIndexName() and WithEnvironment() solely for constructing the Pinecone's endpoints. So this PR introduced WithHost() option, which the host can be easily obtained when creating index database in Pinecone.
PR Checklist
memory: add interfaces for X, Y
orutil: add whizzbang helpers
).Fixes #123
).golangci-lint
checks.This pull request addresses two bugs identified in issue #779:
1. Unexpected Status Code (400) Bug:
2. Unauthorized Response Bug: