-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Cohere in Bedrock with Pinecone #13688
Comments
To address the bug you're experiencing when using Bedrock cohere with Pinecone serverless in node mode with the Steps to Reproduce and Relevant Code
Potential Issues and Solutions1. Ensure Correct Request and Response FormatsEnsure that the request and response formats are correctly handled for the "cohere.command-text-v14" model. Refer to the test cases provided in the 2. Pinecone Vector Store ImplementationEnsure that your implementation of the Pinecone vector store in the class PineconeVectorStore(BasePydanticVectorStore):
# ... other methods ...
def query(self, query: VectorStoreQuery, **kwargs: Any) -> VectorStoreQueryResult:
# Implementation details... 3. Check Pinecone Client VersionEnsure you have the correct version of the Pinecone client installed. You can check and install the Pinecone client as follows: from typing import Any
from packaging import version
def _import_pinecone() -> Any:
try:
import pinecone
except ImportError as e:
raise ImportError(
"Could not import pinecone python package. "
"Please install it with `pip install pinecone-client`."
) from e
return pinecone
def _is_pinecone_v3() -> bool:
pinecone = _import_pinecone()
pinecone_client_version = pinecone.__version__
return version.parse(pinecone_client_version) >= version.parse("3.0.0") By ensuring the correct request and response formats, verifying the Pinecone vector store implementation, and checking the Pinecone client version, you should be able to resolve the bug. If the issue persists, please provide more specific details or logs to further diagnose the problem.
|
Bug Description
I can still reproduce the bug in: #13376
If I use even the newest llama index
I don't have the bug if I just call the embeddings directly like in the first tutorial but:
https://docs.llamaindex.ai/en/stable/examples/embeddings/bedrock/?h=bedrock+emb
Doing this tutorial will fail:
https://docs.llamaindex.ai/en/stable/examples/vector_stores/PineconeIndexDemo/ (naturally if using bedrock embedding cohere)
This at least occurs if using node mode in combination of serverless AWS pinecone:
index = VectorStoreIndex(nodes, storage_context=storage_context, service_context=service_context)
or in certain examples in this mode too:
index.insert_nodes(subnodes)
Would be thankful if this could be solved.
Version
0.10.38
Steps to Reproduce
Use Bedrock cohere with pinecone serverless.
Like in your demo link. Reproduction should at least work if using node import.
Relevant Logs/Tracbacks
https://github.com/run-llama/llama_index/issues/13376 Same bug in special context. Whyever, I am surprised myself that it not disappeared.
The text was updated successfully, but these errors were encountered: