Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ docs = loader.lazy_load()

See the full [Document Loader][loader] tutorial.

## Chat Message History Usage

Use [ChatMessageHistory](https://python.langchain.com/docs/modules/memory/chat_messages/) to store messages and provide conversation history to LLMs.

```python
from langchain_google_cloud_sql_mssql import MSSQLChatMessageHistory, MSSQLEngine


engine = MSSQLEngine.from_instance("project-id", "region", "my-instance", "my-database", "db_user", "db_pass")
history = MSSQLChatMessageHistory(
engine,
table_name="my-message-store",
session_id="my-session_id"
)
```

See the full [Chat Message History][history] tutorial.

## Contributing

Contributions to this library are always welcome and highly encouraged.
Expand All @@ -75,4 +93,5 @@ This is not an officially supported Google product.
[api]: https://console.cloud.google.com/flows/enableapi?apiid=sqladmin.googleapis.com
[auth]: https://googleapis.dev/python/google-api-core/latest/auth.html
[venv]: https://virtualenv.pypa.io/en/latest/
[loader]: ./docs/document_loader.ipynb
[loader]: ./docs/document_loader.ipynb
[history]: ./docs/chat_message_history.ipynb