Skip to content

Callable model #310

Open
Open
@liorheber

Description

@liorheber

Describe the feature

Currently you support instructions as a Callable, which is great to manage at experiment on instructions.
That being said, instructions are usually model dependent. It would be great if the model could accept a callable input as well.

Example:

def get_instructions():
    return langfuse.get_prompt("my-agent").compile()

def get_model():
    return langfuse.get_prompt("my-agent").config.model

agent = Agent(
    name="my-agent"
    instruction=get_insturctions
    model=get_model
)

Another alternative would be to just provided it with a get_config Callable that will return name, instructions, model, etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions