Converting LangChain Messages to OpenAI and Amazon Bedrock Converse Formats (opens in new tab)  6 articles covering this post

When building AI applications with LangChain, your chat history usually lives as a list of LangChain message objects like SystemMessage, HumanMessage, AIMessage, and ToolMessage. That format is convenient inside LangChain, but you may eventually need to save the conversation history, inspect it, or send it to different providers such as OpenAI-compatible APIs or Amazon Bedrock Converse. Out Langchain conversation history will be: Converted to OpenAI chat-completions format. Converted to Amazo...

Read the original article
Sign in to keep reading the full article.

Covered in 6 articles

dev.to··DEV
dev.to··DEV
aws.amazon.com·
View all 6 ›

Keyboard Shortcuts

Navigation

Next / previous item
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help