Iragent
This project is about using agents as simple as possible with small and large language models
|
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 | |
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.
Agent iragent.agent.AgentFactory.__init__ | ( | self, | |
str | base_url, | ||
str | api_key, | ||
str | model, | ||
str | provider = "openai" ) |
iragent.agent.AgentFactory.create_agent | ( | self, | |
name, | |||
** | kwargs ) |
iragent.agent.AgentFactory.api_key = api_key |
iragent.agent.AgentFactory.base_url = base_url |
iragent.agent.AgentFactory.model = model |
iragent.agent.AgentFactory.provider = provider |