Rockset | ü¶úÔ∏èüîó Langchain






Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsMemoryAWS DynamoDBCassandramemoryMomento CacheMongodDBMot√∂rheadPostgresRedisRemembrallRocksetSingleStoreDBSQL (SQLAlchemy)SQLiteStreamlitUpstash Redis Chat Message HistoryXataZepCallbacksChat loadersComponentsMemoryRocksetOn this pageRocksetRockset is a real-time analytics database service for serving low latency, high concurrency analytical queries at scale. It builds a Converged Index‚Ñ¢ on structured and semi-structured data with an efficient store for vector embeddings. Its support for running SQL on schemaless data makes it a perfect choice for running vector search with metadata filters. This notebook goes over how to use Rockset to store chat message history. Setting up‚Äãpip install rocksetTo begin, with get your API key from the Rockset console. Find your API region for the Rockset API reference.Example‚Äãfrom langchain.memory.chat_message_histories import RocksetChatMessageHistoryfrom rockset import RocksetClient, Regionshistory = RocksetChatMessageHistory(    session_id="MySession",    client=RocksetClient(        api_key="YOUR API KEY",         host=Regions.usw2a1 # us-west-2 Oregon    ),    collection="langchain_demo",    sync=True)history.add_user_message("hi!")history.add_ai_message("whats up?")print(history.messages)The output should be something like:[    HumanMessage(content='hi!', additional_kwargs={'id': '2e62f1c2-e9f7-465e-b551-49bae07fe9f0'}, example=False),     AIMessage(content='whats up?', additional_kwargs={'id': 'b9be8eda-4c18-4cf8-81c3-e91e876927d0'}, example=False)]PreviousRemembrallNextSingleStoreDBSetting upExampleCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
Rockset is a real-time analytics database service for serving low latency, high concurrency analytical queries at scale. It builds a Converged Index‚Ñ¢ on structured and semi-structured data with an efficient store for vector embeddings. Its support for running SQL on schemaless data makes it a perfect choice for running vector search with metadata filters.
Rockset is a real-time analytics database service for serving low latency, high concurrency analytical queries at scale. It builds a Converged Index‚Ñ¢ on structured and semi-structured data with an efficient store for vector embeddings. Its support for running SQL on schemaless data makes it a perfect choice for running vector search with metadata filters. ->: Rockset | ü¶úÔ∏èüîó Langchain






Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsMemoryAWS DynamoDBCassandramemoryMomento CacheMongodDBMot√∂rheadPostgresRedisRemembrallRocksetSingleStoreDBSQL (SQLAlchemy)SQLiteStreamlitUpstash Redis Chat Message HistoryXataZepCallbacksChat loadersComponentsMemoryRocksetOn this pageRocksetRockset is a real-time analytics database service for serving low latency, high concurrency analytical queries at scale. It builds a Converged Index‚Ñ¢ on structured and semi-structured data with an efficient store for vector embeddings. Its support for running SQL on schemaless data makes it a perfect choice for running vector search with metadata filters. This notebook goes over how to use Rockset to store chat message history. Setting up‚Äãpip install rocksetTo begin, with get your API key from the Rockset console. Find your API region for the Rockset API reference.Example‚Äãfrom langchain.memory.chat_message_histories import RocksetChatMessageHistoryfrom rockset import RocksetClient, Regionshistory = RocksetChatMessageHistory(    session_id="MySession",    client=RocksetClient(        api_key="YOUR API KEY",         host=Regions.usw2a1 # us-west-2 Oregon    ),    collection="langchain_demo",    sync=True)history.add_user_message("hi!")history.add_ai_message("whats up?")print(history.messages)The output should be something like:[    HumanMessage(content='hi!', additional_kwargs={'id': '2e62f1c2-e9f7-465e-b551-49bae07fe9f0'}, example=False),     AIMessage(content='whats up?', additional_kwargs={'id': 'b9be8eda-4c18-4cf8-81c3-e91e876927d0'}, example=False)]PreviousRemembrallNextSingleStoreDBSetting upExampleCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.