Skip to content

Commit

Permalink
update streamlit ui
Browse files Browse the repository at this point in the history
  • Loading branch information
XuhuiZhou committed Jan 5, 2025
1 parent 0e44603 commit 520a1dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ui/pages/add_characters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
Definition
@app.post("/agents/", response_model=str)
@app.post("/agents", response_model=str)
async def create_agent(agent: BaseAgentProfile) -> str:
agent_profile = BaseAgentProfile(**agent.model_dump())
agent_profile.save()
Expand Down Expand Up @@ -45,7 +45,7 @@ def rendering_character_form() -> None:
print(agent_profile)

response = requests.post(
f"{st.session_state.API_BASE}/agents/",
f"{st.session_state.API_BASE}/agents",
json=agent_profile.model_dump(),
)

Expand Down
4 changes: 2 additions & 2 deletions ui/pages/add_evaluation_dimension.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Definition
@app.get(
"/evaluation_dimensions/", response_model=dict[str, list[CustomEvaluationDimension]]
"/evaluation_dimensions", response_model=dict[str, list[CustomEvaluationDimension]]
)
async def get_evaluation_dimensions() -> dict[str, list[CustomEvaluationDimension]]:
custom_evaluation_dimensions: dict[str, list[CustomEvaluationDimension]] = {}
Expand Down Expand Up @@ -161,7 +161,7 @@ def add_evaluation_dimension() -> None:
# st.write(wrapper.dict())

response = requests.post(
f"{st.session_state.API_BASE}/evaluation_dimensions/",
f"{st.session_state.API_BASE}/evaluation_dimensions",
json=wrapper.dict(),
)

Expand Down
2 changes: 1 addition & 1 deletion ui/pages/add_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def rendering_scenario_form() -> None:
)

response = requests.post(
f"{st.session_state.API_BASE}/scenarios/",
f"{st.session_state.API_BASE}/scenarios",
json=scenario_profile.model_dump(),
)

Expand Down

0 comments on commit 520a1dd

Please sign in to comment.