Skip to content

docs: Add integrations to README.rst #78

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

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,50 @@ Use a vector store to store embedded data and perform vector search.
)


Chat Store Usage
~~~~~~~~~~~~~~~~~~~

A chat store serves as a centralized interface to store your chat history.

.. code-block:: python

from llama_index.core.memory import ChatMemoryBuffer
from llama_index_cloud_sql_pg import PostgresChatStore, PostgresEngine


engine = await PostgresEngine.afrom_instance(
"project-id", "region", "my-instance", "my-database"
)
chat_store = await PostgresChatStore.create(
engine=engine, table_name="chat_store"
)
memory = ChatMemoryBuffer.from_defaults(
token_limit=3000,
chat_store=chat_store,
chat_store_key="user1",
)


Document Reader Usage
~~~~~~~~~~~~~~~~~~~

A Reader ingest data from different data sources and data formats into a simple `Document` representation.

.. code-block:: python

from llama_index.core.memory import ChatMemoryBuffer
from llama_index_cloud_sql_pg import PostgresReader, PostgresEngine


engine = await PostgresEngine.afrom_instance(
"project-id", "region", "my-instance", "my-database"
)
reader = await PostgresReader.create(
engine=engine, table_name="my-db-table"
)
documents = await reader.aload_data()


Document Store Usage
~~~~~~~~~~~~~~~~~~~~~

Expand Down