Skip to content

Commit 549eacc

Browse files
committed
fix lint
Signed-off-by: Jack Luar <[email protected]>
1 parent fc9a12b commit 549eacc

File tree

4 files changed

+28
-47
lines changed

4 files changed

+28
-47
lines changed

backend/src/agents/retriever_mcp.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
from langgraph.graph import END
66
from .retriever_typing import AgentState
77
from langchain.prompts import ChatPromptTemplate
8-
from ..prompts.prompt_templates import run_orfs_prompt_template
98
from langchain_core.tools.base import ToolException
109
from langchain_google_vertexai import ChatVertexAI
1110
from langchain_google_genai import ChatGoogleGenerativeAI
1211
from langchain_ollama import ChatOllama
1312

1413
from ..prompts.tool_examples import mcp_system_prompt, few_shot_examples
1514

15+
1616
class MCP:
1717
llm: ChatVertexAI | ChatGoogleGenerativeAI | ChatOllama
1818
workflow: Any
@@ -24,16 +24,16 @@ def mcp_agent(self, state: AgentState) -> dict[str, list[Any]]:
2424
custom_tools = get_tools()
2525
model = self.llm.bind_tools(custom_tools)
2626

27-
orfs_tmp = ChatPromptTemplate.from_messages([
28-
("system", mcp_system_prompt),
29-
*few_shot_examples,
30-
(
31-
"user",
32-
"Previous conversation:\n{chat_history}\n\nCurrent question:\n{question}",
33-
)
34-
])
35-
36-
#orfs_tmp = ChatPromptTemplate.from_template(run_orfs_prompt_template)
27+
orfs_tmp = ChatPromptTemplate.from_messages(
28+
[
29+
("system", mcp_system_prompt),
30+
*few_shot_examples,
31+
(
32+
"user",
33+
"Previous conversation:\n{chat_history}\n\nCurrent question:\n{question}",
34+
),
35+
]
36+
)
3737

3838
run_orfs_chain = orfs_tmp | model
3939

backend/src/openroad_mcp/server/orfs/orfs_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def metrics(cmd: str) -> str:
113113
ORFS.server._check_configuration()
114114
ORFS.server._command("metadata")
115115

116-
return f"finished metadata"
116+
return "finished metadata"
117117

118118
@staticmethod
119119
@ORFS.mcp.tool

backend/src/prompts/tool_examples.py

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,90 +10,71 @@
1010

1111
few_shot_examples = [
1212
### Start
13-
1413
### get_platforms
1514
{
1615
"role": "user",
17-
"content": "Get list of available platforms and select default plaform."
16+
"content": "Get list of available platforms and select default plaform.",
1817
},
1918
{
2019
"role": "assistant",
2120
"content": """{{
2221
"name": "get_platforms",
2322
"args": {{}}
24-
}}"""
23+
}}""",
2524
},
2625
###
27-
2826
### get_designs
2927
{
3028
"role": "user",
31-
"content": "Get list of available designs and select default design."
29+
"content": "Get list of available designs and select default design.",
3230
},
3331
{
3432
"role": "assistant",
3533
"content": """{{
3634
"name": "get_designs",
3735
"args": {{}}
38-
}}"""
36+
}}""",
3937
},
4038
###
41-
4239
### make
43-
{
44-
"role": "user",
45-
"content": "make clean_all"
46-
},
40+
{"role": "user", "content": "make clean_all"},
4741
{
4842
"role": "assistant",
4943
"content": """{{
5044
"name": "make",
5145
"args": {{"cmd": "clean_all"}}
52-
}}"""
46+
}}""",
5347
},
5448
###
55-
5649
### get_stage_names
57-
{
58-
"role": "user",
59-
"content": "Get list of stage names available to run."
60-
},
50+
{"role": "user", "content": "Get list of stage names available to run."},
6151
{
6252
"role": "assistant",
6353
"content": """{{
6454
"name": "get_stage_names",
6555
"args": {{}}
66-
}}"""
56+
}}""",
6757
},
6858
###
69-
7059
### jump
71-
{
72-
"role": "user",
73-
"content": "jump floorplan"
74-
},
60+
{"role": "user", "content": "jump floorplan"},
7561
{
7662
"role": "assistant",
7763
"content": """{{
7864
"name": "jump",
7965
"args": {{"stage": "floorplan"}}
80-
}}"""
66+
}}""",
8167
},
8268
###
83-
8469
### jump
85-
{
86-
"role": "user",
87-
"content": "step"
88-
},
70+
{"role": "user", "content": "step"},
8971
{
9072
"role": "assistant",
9173
"content": """{{
9274
"name": "step",
9375
"args": {{}}
94-
}}"""
76+
}}""",
9577
},
9678
###
97-
9879
### End
9980
]

backend/uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)