MCPcopy Create free account
hub / github.com/VersusControl/devops-ai-guidelines / to_langchain

Function to_langchain

03-ai-agent-for-devops/code/10/app.py:119–127  ·  view source on GitHub ↗

Convert our message dicts to LangChain message objects.

(messages: list)

Source from the content-addressed store, hash-verified

117# Chat helpers
118# ─────────────────────────────────────────────────────────────
119def to_langchain(messages: list) -> list:
120 """Convert our message dicts to LangChain message objects."""
121 out = []
122 for m in messages:
123 if m["role"] == "user":
124 out.append(HumanMessage(content=m["content"]))
125 else:
126 out.append(AIMessage(content=m["content"]))
127 return out
128
129
130def display_history():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected