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

Function to_langchain

03-ai-agent-for-devops/code/13/app.py:137–145  ·  view source on GitHub ↗

Convert our message dicts to LangChain message objects.

(messages: list)

Source from the content-addressed store, hash-verified

135# Chat helpers
136# ─────────────────────────────────────────────────────────────
137def to_langchain(messages: list) -> list:
138 """Convert our message dicts to LangChain message objects."""
139 out = []
140 for m in messages:
141 if m["role"] == "user":
142 out.append(HumanMessage(content=m["content"]))
143 else:
144 out.append(AIMessage(content=m["content"]))
145 return out
146
147
148def display_history():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected