Iragent
This project is about using agents as simple as possible with small and large language models
Loading...
Searching...
No Matches
iragent.agent.AgentFactory Class Reference

Public Member Functions

Agent __init__ (self, str base_url, str api_key, str model, str provider="openai")
 
 create_agent (self, name, **kwargs)
 

Public Attributes

 base_url = base_url
 
 api_key = api_key
 
 model = model
 
 provider = provider
 

Detailed Description

A factory class for creating Agent instances with shared configuration.

This class simplifies the process of creating multiple agents by 
reusing common parameters such as `base_url`, `api_key`, `model`, 
and `provider`. Additional agent-specific parameters can be passed 
through the `create_agent` method.

Attributes:
    base_url (str): The base URL for the agent's API requests.
    api_key (str): The API key used for authentication.
    model (str): The model identifier used by the agent.
    provider (str): The provider name (e.g., 'openai', 'azure', etc.).

Methods:
    create_agent(name, **kwargs): 
        Creates and returns a new Agent instance using the shared
        configuration and any additional keyword arguments.    

Constructor & Destructor Documentation

◆ __init__()

Agent iragent.agent.AgentFactory.__init__ ( self,
str base_url,
str api_key,
str model,
str provider = "openai" )

Member Function Documentation

◆ create_agent()

iragent.agent.AgentFactory.create_agent ( self,
name,
** kwargs )

Member Data Documentation

◆ api_key

iragent.agent.AgentFactory.api_key = api_key

◆ base_url

iragent.agent.AgentFactory.base_url = base_url

◆ model

iragent.agent.AgentFactory.model = model

◆ provider

iragent.agent.AgentFactory.provider = provider

The documentation for this class was generated from the following file: