Skip to content

Automatic LLM Client Resolution for Activities #295

@bibryam

Description

@bibryam

Description
Agents already resolve an LLM client automatically when one is not specified. They fall back to the dapr chat client, then to a conversation component. If exactly one LLM component exists, it is selected.

I want LLM activities to use the same resolution logic, so I do not need to create an LLM client explicitly.

From this

llm = DaprChatClient(component_name="openai")

@llm_activity(
    prompt="Create a very short outline about the topic '{topic}'. Provide 5 bullet points only.",
    llm=llm,
)
 

To this as default behaviour

@llm_activity(
    prompt="Create a very short outline about the topic '{topic}'. Provide 5 bullet points only."
)
 

This will align the existing LLM resolution logic between the agent and workflows

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