We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eac6d47 commit bbc3cc7Copy full SHA for bbc3cc7
mesa_llm/llm_agent.py
@@ -3,4 +3,9 @@
3
4
class LLMAgent:
5
def __init__(self, api_key: str, model: str = "openai/gpt-4o"):
6
+ """Initialize the LLMAgent with a ModuleLLM instance."""
7
+ self.llm = ModuleLLM(api_key=api_key, model=model)
8
+
9
+ def set_llm(self, api_key: str, model: str = "openai/gpt-4o") -> None:
10
+ """Replace the current LLM with a new configuration."""
11
self.llm = ModuleLLM(api_key=api_key, model=model)
0 commit comments