Skip to content

Conversation

@tzolov
Copy link
Contributor

@tzolov tzolov commented May 26, 2025

  • Convert non-primitive metadata values to JSON strings in ChromaApi.AddEmbeddingsRequest for compatibility
  • Add tests to verify metadata conversion and complex metadata handling in Chroma vector store integration
  • Ensure OpenAiChatModel always returns annotations as a list of maps in metadata
  • Add test dependency on spring-ai-advisors-vector-store for advisor-related tests

BACK-PORT to 1.0.1 as well!

- Convert non-primitive metadata values to JSON strings in ChromaApi.AddEmbeddingsRequest for compatibility
- Add tests to verify metadata conversion and complex metadata handling in Chroma vector store integration
- Ensure OpenAiChatModel always returns annotations as a list of maps in metadata
- Add test dependency on spring-ai-advisors-vector-store for advisor-related tests

Signed-off-by: Christian Tzolov <[email protected]>
@tzolov tzolov added this to the 1.1.x milestone May 26, 2025
assertThat(processed.get("strVal")).isInstanceOf(String.class);
assertThat(processed.get("doubleVal")).isInstanceOf(Number.class).isEqualTo(3.14);
assertThat(processed.get("listVal")).isInstanceOf(String.class).isEqualTo("[1,2,3]");
assertThat(processed.get("mapVal")).isInstanceOf(String.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also verify that the value of mapVal is what we expect it to be?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. It is done

.uri("/api/v2/tenants/{tenant_name}/databases/{database_name}/collections/{collection_name}/upsert",
tenantName, databaseName, collectionId)
.headers(this::httpHeaders)
// .headers(this::httpHeaders)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a mistake. Thanks for catching it

Signed-off-by: Christian Tzolov <[email protected]>
@ilayaperumalg
Copy link
Member

Squashed, rebased and merged as 7466cb9

@ilayaperumalg
Copy link
Member

Also, back-ported into 1.0.x via aba837a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants