forked from phoenix/litellm-mirror
add everyting for docs
This commit is contained in:
parent
de45a738ee
commit
0fe8799f94
1015 changed files with 185353 additions and 0 deletions
23
docs/snippets/modules/memory/chat_messages/get_started.mdx
Normal file
23
docs/snippets/modules/memory/chat_messages/get_started.mdx
Normal file
|
@ -0,0 +1,23 @@
|
|||
```python
|
||||
from langchain.memory import ChatMessageHistory
|
||||
|
||||
history = ChatMessageHistory()
|
||||
|
||||
history.add_user_message("hi!")
|
||||
|
||||
history.add_ai_message("whats up?")
|
||||
```
|
||||
|
||||
|
||||
```python
|
||||
history.messages
|
||||
```
|
||||
|
||||
<CodeOutputBlock lang="python">
|
||||
|
||||
```
|
||||
[HumanMessage(content='hi!', additional_kwargs={}),
|
||||
AIMessage(content='whats up?', additional_kwargs={})]
|
||||
```
|
||||
|
||||
</CodeOutputBlock>
|
Loading…
Add table
Add a link
Reference in a new issue