Skip to content

Not all the agents are LLM based. #639

@luxunxiansheng

Description

@luxunxiansheng

hi, there,

Sorry i come to this topic again in this new thread.

if conf is None:
            model_name = os.getenv("LLM_MODEL_NAME")
            api_key = os.getenv("LLM_API_KEY")
            base_url = os.getenv("LLM_BASE_URL")

            assert api_key and model_name, (
                "LLM_MODEL_NAME and LLM_API_KEY (environment variables) must be set, "
                "or pass AgentConfig explicitly"
            )
            logger.info(f"AgentConfig is empty, using env variables:\n"
                        f"LLM_API_KEY={'*' * min(len(api_key), 8) if api_key else 'Not set'}\n"
                        f"LLM_BASE_URL={base_url}\n"
                        f"LLM_MODEL_NAME={model_name}")

            conf = AgentConfig(
                llm_provider=os.getenv("LLM_PROVIDER", "openai"),
                llm_model_name=model_name,
                llm_api_key=api_key,
                llm_base_url=base_url,
                llm_temperature=float(os.getenv("LLM_TEMPERATURE", "0.7")),
            )
        else:
            self.conf = conf

The base class should not be aware of its subclass. The BaseAgent won't care if a LLM will be used in the future.

Aworld can do much more than just to wrap a LLM. In a nutshell, Don't be tempted to LLM , IMHO.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions