|
5 | 5 | from typing import List, Dict, Any, Optional, Union
|
6 | 6 | import logging
|
7 | 7 | from pydantic import BaseModel
|
8 |
| - |
9 |
| -logging.basicConfig( |
10 |
| - level=logging.DEBUG, |
11 |
| - format="%(asctime)s - %(levelname)s - %(message)s", |
12 |
| - force=True, |
13 |
| -) |
14 |
| - |
15 |
| -# Import required components from the Sotopia codebase. |
16 | 8 | from sotopia.api.websocket_utils import (
|
17 | 9 | build_observation,
|
18 | 10 | get_env_agents,
|
|
30 | 22 | from sotopia.database import EnvironmentProfile, AgentProfile, EvaluationDimensionBuilder
|
31 | 23 | from sotopia.database.persistent_profile import RelationshipType
|
32 | 24 |
|
| 25 | + |
| 26 | +logging.basicConfig( |
| 27 | + level=logging.DEBUG, |
| 28 | + format="%(asctime)s - %(levelname)s - %(message)s", |
| 29 | + force=True, |
| 30 | +) |
| 31 | + |
| 32 | +# Import required components from the Sotopia codebase. |
| 33 | + |
33 | 34 | # =============================================================================
|
34 | 35 | # Dummy classes to simulate database objects
|
35 | 36 | # =============================================================================
|
@@ -206,7 +207,6 @@ def __init__(self) -> None:
|
206 | 207 | "content": dummy_msgs["agent1"].to_natural_language()
|
207 | 208 | }]
|
208 | 209 | async def process_turn(self, client_data: Dict[str, str]) -> Dict[str, Union[int, str]]:
|
209 |
| - from sotopia.api.websocket_utils import build_observation |
210 | 210 | self.conversation_history.append({"role": "client", "content": client_data.get("content", "")})
|
211 | 211 | agent_id: str = client_data.get("agent_id")
|
212 | 212 | if agent_id not in self.agents:
|
|
0 commit comments