-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Error while saving to Semantic Memory using NoSQL #6379
Comments
I believe this is because the Cosmos NoSQL connector uses the |
4 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Jun 12, 2024
### Motivation and Context When using SemanticTextMemory.SaveReferenceAsync, no value is passed for the `Key` to use. In the Cosmos DB Memory Connector, we treat the "Key" as the Id and PartitionKey, and so it has to have a value. Address this by generating a `GUID` to use if none are provided. ### Description * Assign a GUID key when the passed in `MemoryRecord.Key` is null or empty so that CosmosDB always has a valid PartitionKey. * While adding test coverage for this I noticed two things: 1. `withEmbeddings` is ignored in `AzureCosmosDBNoSQLMemoryStore.GetAsync`. It's not clear whether it's worth changing this, as point reads like the current one tend to be less expensive than queries in Cosmos DB. 2. The SimilarityScore returned from `GetNearestAsync` wasn't actually a similarity, it was a cosine distance. Normalize that. Fixes #6379. ### Contribution Checklist - [x] The code builds clean without any errors or warnings - [x] The PR follows the [SK Contribution Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [x] All unit tests pass, and I have added new tests where possible - [x] I didn't break anyone 😄 --------- Co-authored-by: Dmytro Struk <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to store into Semantic Memory using below code
I am getting the below exception and can’t make out what it refers to as input name.
"Microsoft.Azure.Cosmos.CosmosException : Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 76cf2457-164b-49c0-b249-6e929bef8dfc; Reason: (Message: {"Errors":["The input name '' is invalid.
@Pilchie
The text was updated successfully, but these errors were encountered: