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 loadersComponentsMemoryMot√∂rheadOn this pageMot√∂rheadMot√∂rhead is a memory server implemented in Rust. It automatically handles incremental summarization in the background and allows for stateless applications.Setup‚ÄãSee instructions at Mot√∂rhead for running the server locally.from langchain.memory.motorhead_memory import MotorheadMemoryExample‚Äãfrom langchain.llms import OpenAIfrom langchain.chains import LLMChainfrom langchain.prompts import PromptTemplatetemplate = """You are a chatbot having a conversation with a human.{chat_history}Human: {human_input}AI:"""prompt = PromptTemplate(    input_variables=["chat_history", "human_input"], template=template)memory = MotorheadMemory(    session_id="testing-1", url="http://localhost:8080", memory_key="chat_history")await memory.init()# loads previous state from Mot√∂rhead ü§òllm_chain = LLMChain(    llm=OpenAI(),    prompt=prompt,    verbose=True,    memory=memory,)llm_chain.run("hi im bob")            > Entering new LLMChain chain...    Prompt after formatting:    You are a chatbot having a conversation with a human.            Human: hi im bob    AI:        > Finished chain.    ' Hi Bob, nice to meet you! How are you doing today?'llm_chain.run("whats my name?")            > Entering new LLMChain chain...    Prompt after formatting:    You are a chatbot having a conversation with a human.        Human: hi im bob    AI:  Hi Bob, nice to meet you! How are you doing today?    Human: whats my name?    AI:        > Finished chain.    '
Mot√∂rhead is a memory server implemented in Rust. It automatically handles incremental summarization in the background and allows for stateless applications.
Mot√∂rhead is a memory server implemented in Rust. It automatically handles incremental summarization in the background and allows for stateless applications. ->: 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 loadersComponentsMemoryMot√∂rheadOn this pageMot√∂rheadMot√∂rhead is a memory server implemented in Rust. It automatically handles incremental summarization in the background and allows for stateless applications.Setup‚ÄãSee instructions at Mot√∂rhead for running the server locally.from langchain.memory.motorhead_memory import MotorheadMemoryExample‚Äãfrom langchain.llms import OpenAIfrom langchain.chains import LLMChainfrom langchain.prompts import PromptTemplatetemplate = """You are a chatbot having a conversation with a human.{chat_history}Human: {human_input}AI:"""prompt = PromptTemplate(    input_variables=["chat_history", "human_input"], template=template)memory = MotorheadMemory(    session_id="testing-1", url="http://localhost:8080", memory_key="chat_history")await memory.init()# loads previous state from Mot√∂rhead ü§òllm_chain = LLMChain(    llm=OpenAI(),    prompt=prompt,    verbose=True,    memory=memory,)llm_chain.run("hi im bob")            > Entering new LLMChain chain...    Prompt after formatting:    You are a chatbot having a conversation with a human.            Human: hi im bob    AI:        > Finished chain.    ' Hi Bob, nice to meet you! How are you doing today?'llm_chain.run("whats my name?")            > Entering new LLMChain chain...    Prompt after formatting:    You are a chatbot having a conversation with a human.        Human: hi im bob    AI:  Hi Bob, nice to meet you! How are you doing today?    Human: whats my name?    AI:        > Finished chain.    '