Skip to content

Commit

Permalink
get agent max_iter config from env-var
Browse files Browse the repository at this point in the history
  • Loading branch information
selimseker committed Jun 6, 2024
1 parent 6923e31 commit 4385bfb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dria_searching_agent/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def __init__(self):

self.agent_model_provider = os.getenv('AGENT_MODEL_PROVIDER')
self.agent_model = os.getenv('AGENT_MODEL')
self.agent_max_iter = os.getenv('AGENT_MAX_ITER', 10)

self.anthropic_key = os.getenv('ANTHROPIC_KEY')
self.openai_api_key = os.getenv('OPENAI_API_KEY')
Expand All @@ -30,6 +31,9 @@ def AGENT_MODEL_PROVIDER():
def AGENT_MODEL():
return config.agent_model

def AGENT_MAX_ITER():
return config.agent_max_iter

def ANTHROPIC_KEY():
return config.anthropic_key

Expand Down
1 change: 1 addition & 0 deletions src/dria_searching_agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def __create_agents(self):
for k,v in self.agents_config.items():
agent = Agent(
**v,
max_iter=config.AGENT_MAX_ITER(), # TODO: maybe we can get this from agents.json
verbose=True,
llm = self.__get_model(),
tools=[
Expand Down

0 comments on commit 4385bfb

Please sign in to comment.