diff --git a/README.md b/README.md index f51c00d3..32102b93 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ class YourOwnAgent(...): def act(self, **kwargs): ... - def run(self, query: str, previous_experience: str): + def run(self, query: str): ... ``` diff --git a/cookbook/simple_agent/quick_start.md b/cookbook/simple_agent/quick_start.md index 6214d6a6..239b9561 100644 --- a/cookbook/simple_agent/quick_start.md +++ b/cookbook/simple_agent/quick_start.md @@ -29,7 +29,7 @@ class YourOwnAgent(...): def act(self, **kwargs): ... - def run(self, query: str, previous_experience: str): + def run(self, query: str): ... ``` diff --git a/cookbook/simple_agent/your_own_agent.py b/cookbook/simple_agent/your_own_agent.py index 75582a67..dfc5726c 100644 --- a/cookbook/simple_agent/your_own_agent.py +++ b/cookbook/simple_agent/your_own_agent.py @@ -106,7 +106,7 @@ class YourOwnAgent(PromptMixin): return context.messages -if __name__ == "__main__": +def main(): query = "Analyze Xiaomi Corporation." # query = "分析一下小米公司" @@ -116,3 +116,6 @@ if __name__ == "__main__": logger.info(answer) with open("messages.jsonl", "w") as f: f.write(json.dumps([x.model_dump() for x in messages], indent=2, ensure_ascii=False)) + +if __name__ == "__main__": + main() diff --git a/experiencemaker/utils/http_client.py b/experiencemaker/utils/http_client.py index 4a84d485..3f12e308 100644 --- a/experiencemaker/utils/http_client.py +++ b/experiencemaker/utils/http_client.py @@ -18,9 +18,9 @@ class HttpClient(BaseModel): request_start_time: float = Field(default_factory=time.time) request_time_cost: float = Field(default=0.0, description="request time cost") - retry_sleep_time: float = Field(0.5, description="interval time for retry") - retry_time_multiplier: float = Field(2.0, description="retry time multiplier") - retry_max_count: int = Field(1, description="maximum number of retries") + retry_sleep_time: float = Field(default=0.5, description="interval time for retry") + retry_time_multiplier: float = Field(default=2.0, description="retry time multiplier") + retry_max_count: int = Field(default=1, description="maximum number of retries") _client: Any = PrivateAttr()