-
Notifications
You must be signed in to change notification settings - Fork 102
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
[DON'T MERGE] Langchain Integration #1312
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for hardcore-allen-f5257d ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor copy edit, looks good.
== Updating the Vector Store | ||
|
||
Once the vector store is created, you can start adding LangChain documents or string data into it. | ||
While adding the data, you have the option to associate identifiers and metadata with them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While adding the data, you have the option to associate identifiers and metadata with them. | |
While adding the data, you have the option to associate identifiers and metadata with it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Data plural isn't wrong, just think this is more elegant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Amanda,
Updated at: cfce797
---- | ||
|
||
`Hazelcast.add_texts` method returns the IDs of the added texts. | ||
If the IDs were not provided to the `add_texts` method, then they are automatically genereated, like in the example above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the IDs were not provided to the `add_texts` method, then they are automatically genereated, like in the example above. | |
If the IDs were not provided to the `add_texts` method, then they are automatically generated, like in the example above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated at: cfce797
If the IDs were not provided to the `add_texts` method, then they are automatically genereated, like in the example above. | ||
|
||
You can provide the IDs manually by passing them in the `ids` parameter. | ||
That may be useful in case you would like to update data instead of extending the vector store. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That may be useful in case you would like to update data instead of extending the vector store. | |
This is useful when you want to update data instead of extending the vector store. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated at: cfce797
) | ||
---- | ||
|
||
In case you have `langchain_core.documents.Document` objects, you can use the `add_documents` methods to add them to the vector store: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case you have `langchain_core.documents.Document` objects, you can use the `add_documents` methods to add them to the vector store: | |
If you have `langchain_core.documents.Document` objects, you can use the `add_documents` methods to add them to the vector store: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated at: cfce797
---- | ||
|
||
`Hazelcast` vector store has two class methods that combine creating the vector store and adding texts or documents to it. | ||
Those are `Hazelcast.from_texts` and `Hazelcast.from_documents` methods respectively. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are `Hazelcast.from_texts` and `Hazelcast.from_documents` methods respectively. | |
These are the `Hazelcast.from_texts` and `Hazelcast.from_documents` methods, respectively. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated at: cfce797
|
||
`Hazelcast` vector store has two class methods that combine creating the vector store and adding texts or documents to it. | ||
Those are `Hazelcast.from_texts` and `Hazelcast.from_documents` methods respectively. | ||
Calling these methods return the `Hazelcast` vector store instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling these methods return the `Hazelcast` vector store instance. | |
Calling these methods returns the `Hazelcast` vector store instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated at: cfce797
---- | ||
|
||
To delete some or all Documents, you can use the `delete` method. | ||
It deletes the Documents with the given IDs if one or more IDs provided, or deletes all Documents if no IDs are provided. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It deletes the Documents with the given IDs if one or more IDs provided, or deletes all Documents if no IDs are provided. | |
It deletes the Documents with the given IDs if one or more IDs are provided, or deletes all Documents if no IDs are provided. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated at: cfce797
@amandalindsay Thanks for the review. |
|
||
`langchain-hazelcast` package provides the Hazelcast `VectorStore` implementation for LangChain. | ||
|
||
== Installing LangChain/Hazelcast Vector Store |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes Vector Store uses initial caps, sometimes it's all lower case. Is it a proper name (in which case it should be 'Vector Store')?
|
||
You can retrieve Documents in the vector store using the `get_by_ids` method. | ||
This method takes a sequence of IDs and returns the corresponding Documents if they exist. | ||
Note that, the order of the IDs and the returned Documents may not be the same: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that, the order of the IDs and the returned Documents may not be the same: | |
Note that the order of the IDs and the returned Documents may not be the same: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple of minor suggestions, the main one being that we need to be consistent with the capitalization of vector store throughout
Adds LangChaing integration for Python docs.
I've added a top-level LangChain navigation item under "Integrate", but I will also add a LangChain tutorial later and we may have more LangChain integrations.
Can the page introduced in this PR serve as the parent page for those?