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

Function to_langchain

03-ai-agent-for-devops/code/12/app.py:133–141  ·  view source on GitHub ↗

Convert our message dicts to LangChain message objects.

(messages: list)

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected