Skip to content

Commit

Permalink
Add simulator_id to configuration (#147)
Browse files Browse the repository at this point in the history
Fixes #140
  • Loading branch information
NoB0 authored May 13, 2024
1 parent 07b4d33 commit b1e8ae2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions config/default/config_default.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
agent_id: "IAI MovieBot"
simulator_id: "User Simulator"
output_name: "moviebot"
# By default, the agent has an HTTP API.
agent_uri: "http://127.0.0.1:5001"
Expand Down
6 changes: 3 additions & 3 deletions usersimcrs/run_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def main(config: confuse.Configuration, agent: Agent) -> None:
nlg = ConditionalNLG(template)

simulator = AgendaBasedSimulator(
"TEST03",
config["simulator_id"].get(),
preference_model,
interaction_model,
nlu,
Expand Down Expand Up @@ -358,9 +358,9 @@ def load_rasa_diet_classifier(
# See usage example in README for more details.
agent_uri = config["agent_uri"].get()
try:
response = requests.get(agent_uri)
response = requests.get(agent_uri, timeout=60)
assert response.status_code == 200
agent = MovieBotAgent(agent_id="MovieBotTester", uri=agent_uri)
agent = MovieBotAgent(agent_id=config["agent_id"].get(), uri=agent_uri)
except requests.exceptions.RequestException:
raise RuntimeError(
f"Connection refused to {agent_uri}. Please check that "
Expand Down

0 comments on commit b1e8ae2

Please sign in to comment.