Skip to content

Pass actor= to the llm.model() and llm.models() methods #3

@simonw

Description

@simonw

For accounting reasons we want to track which actor was responsible for enrichment operations.

This means we need to pass actor= to this method call:

model = await llm.model(model_id, purpose=PURPOSE)

But this happens inside the enrich_batch() method which doesn't have access to the actor - it should be able to lookup an actor_id from the job_id though...

Which means we can use await datasette.actors_from_ids([actor_id])[actor_id] to get the actor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions