You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CosmosHttpResponseError: (BadRequest) One of the input values is invalid.
ActivityId: 3a2a7521-b72a-4723-bb4a-2fe8d49233c6, Windows/10.0.20348 cosmos-netstandard-sdk/3.18.0
Code: BadRequest
Message: One of the input values is invalid.\r
ActivityId: 3a2a7521-b72a-4723-bb4a-2fe8d49233c6, Windows/10.0.20348 cosmos-netstandard-sdk/3.18.0"
Hey @nqtung! 👋 I'm here to assist you with any bugs, questions, or contributions you have. Let's squash those bugs together!
The error message "CosmosHttpResponseError: (BadRequest) One of the input values is invalid" can be caused by several issues when querying Azure Cosmos DB using the LlamaIndex framework. Here are some common causes and solutions:
Invalid Partition Key: Ensure that the partition key specified in your Cosmos DB setup matches the one used in your query. If the partition key is incorrect or not set, it can lead to this error.
Invalid Item ID: Check that the item ID used in your query is correct and exists in the database. The ID must be correctly formatted and match the expected schema.
Incorrect Container or Database Properties: Verify that properties such as offer_throughput, session_token, etag, and match_condition are correctly set and applicable to your operation.
Invalid JSON Structure: Ensure that the JSON structure of the item being queried matches the expected schema. This includes having all required fields like "id" or "messages" correctly named and formatted.
Exceeding Property Limits: The total size of all properties in an item should not exceed the maximum allowed size for Cosmos DB, which is 2,097,152 bytes.
Minimum Vector Count: If you are using index types like quantizedFlat or diskANN, ensure that you have at least 1,000 vectors indexed, as querying with fewer vectors may lead to this error [1][2].
Make sure to validate and sanitize your data before performing operations, and ensure that all configurations match your Cosmos DB setup.
Pretty sure this is fixed, but you'll need to update to the latest version of llama index and the vector store integration. You are on a fairly old version
Bug Description
Got the error message when trying to query index from CosmosDBNoSQL by following the example at https://docs.llamaindex.ai/en/stable/examples/vector_stores/AzureCosmosDBNoSqlDemo/
The error message:
CosmosHttpResponseError: (BadRequest) One of the input values is invalid.
ActivityId: 3a2a7521-b72a-4723-bb4a-2fe8d49233c6, Windows/10.0.20348 cosmos-netstandard-sdk/3.18.0
Code: BadRequest
Message: One of the input values is invalid.\r
ActivityId: 3a2a7521-b72a-4723-bb4a-2fe8d49233c6, Windows/10.0.20348 cosmos-netstandard-sdk/3.18.0"
The package dependency
Version
0.10.68
Steps to Reproduce
query_engine = index.as_query_engine() response = query_engine.query("What did the author love working on?")
Relevant Logs/Tracbacks
The text was updated successfully, but these errors were encountered: