Skip to content

Commit

Permalink
Merge branch '0.2' into web-surfer-not-full-copy-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedrekao authored Nov 7, 2024
2 parents 27ed1e7 + 23c14bc commit 2f9cf1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion autogen/oai/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ def extract_text_or_completion_object(

def _throttle_api_calls(self, idx: int) -> None:
"""Rate limit api calls."""
if self._rate_limiters[idx]:
if idx < len(self._rate_limiters) and self._rate_limiters[idx]:
limiter = self._rate_limiters[idx]

assert limiter is not None
Expand Down
2 changes: 1 addition & 1 deletion website/docs/Getting-Started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pip install autogen-agentchat~=0.2
import os
from autogen import AssistantAgent, UserProxyAgent

llm_config = {"model": "gpt-4", "api_key": os.environ["OPENAI_API_KEY"]}
llm_config = { "config_list": [{ "model": "gpt-4", "api_key": os.environ.get("OPENAI_API_KEY") }] }
assistant = AssistantAgent("assistant", llm_config=llm_config)
user_proxy = UserProxyAgent("user_proxy", code_execution_config=False)

Expand Down

0 comments on commit 2f9cf1c

Please sign in to comment.