Skip to content

Add Neo4j examples after community migration #155

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

Merged
merged 5 commits into from
May 8, 2025

Conversation

vga91
Copy link
Contributor

@vga91 vga91 commented Apr 24, 2025

Add Neo4j examples after community migration

  • Neo4jEmbeddingStore configuration examples
  • Neo4jText2CypherRetriever example
  • Spring Boot example

@dliubarskyi
Copy link
Member

@vga91 thank you! But it does not compile because Neo4jGraph.builder() and Neo4jText2CypherRetriever.build() are not public.

@vga91 vga91 marked this pull request as draft April 24, 2025 15:23
@vga91
Copy link
Contributor Author

vga91 commented Apr 24, 2025

Yeah sorry I forgot to draft it, the public modifiers have been changed but not yet released.
I will put the pr in ready to review when possible.

@vga91 vga91 force-pushed the add-neo4j-community-examples branch from a80bb25 to cff3155 Compare May 5, 2025 12:33
@vga91 vga91 marked this pull request as ready for review May 5, 2025 13:02
@vga91
Copy link
Contributor Author

vga91 commented May 5, 2025

@dliubarskyi currently it should compile correctly, thank you.

@vga91 vga91 force-pushed the add-neo4j-community-examples branch from 48b0e90 to 2c48933 Compare May 6, 2025 15:42
@vga91
Copy link
Contributor Author

vga91 commented May 7, 2025

@dliubarskyi we would like to add some adoc tagged regions like above,
so that we can add e.g. include::https://github.com/langchain4j/langchain4j-examples/raw/main/neo4j-example/src/main/java/Neo4jEmbeddingStoreExample.java[tags=add-single-embedding] in the Neo4j documentation here.

Would it be possible to add them in here?

        // tag::add-single-embedding[]
        TextSegment segment1 = TextSegment.from("I like football.");
        Embedding embedding1 = embeddingModel.embed(segment1).content();
        minimalEmbedding.add(embedding1, segment1);
        // end::add-single-embedding[]

@dliubarskyi
Copy link
Member

@vga91

Would it be possible to add them in here?

Probably yes, but I am not sure how exactly to do that, could you please explain?

Copy link
Member

@dliubarskyi dliubarskyi left a comment

Choose a reason for hiding this comment

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

@vga91 thank you!

@dliubarskyi dliubarskyi merged commit e838ad9 into langchain4j:main May 8, 2025
@vga91
Copy link
Contributor Author

vga91 commented May 9, 2025

@vga91

Would it be possible to add them in here?

Probably yes, but I am not sure how exactly to do that, could you please explain?

@dliubarskyi Yes sure,
the idea is to add the tags like these ones I created in my fork,

so that in the neo4j documentations' adoc repo here, if we write

[source,java]
----
include::https://raw.githubusercontent.com/langchain4j/langchain4j-examples/refs/heads/test-tags/neo4j-example/src/main/java/Neo4jEmbeddingStoreExample.java[tags=test]
----

the following portion will be rendered:
Screenshot 2025-05-09 at 14 27 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants