Matthew Brown
Matthew Brown
I was exploring this earlier this week.. from my grep of the codebase it's not possible currently because `__call__` in `PydanticBaseSettingsSource` doesn't get the current state of the settings model...
We have a pretty large set of tools we've built and have been using a pydantic model to define the arguments. It's worked very well - you get built in...
The interesting case is https://github.com/livekit/agents/issues/1955#issuecomment-2795672931 and https://github.com/livekit/agents/blob/86017364d3cd50f08397311d66fc47788279820b/livekit-agents/livekit/agents/llm/utils.py#L172-L174 shows that internally it's transformed to a pydantic model anyway in at least for OpenAI and Anthropic LLMs. Proposing a couple of different...
@theomonnom saw your PR 🙌 Any chance raw function tools could support context - similar to normal function tools? Happy to put up a quick PR iterating on https://github.com/elyosenergy/agents/blob/c839ac2fcbdf1b80f159095e4ea22f676aa1f05e/livekit-agents/livekit/agents/voice/generation.py#L341-L350
Couldn't help myself https://github.com/livekit/agents/pull/2073
Upon reflection I'm not sure this is the best approach.. it would possibly leave a connection in a state that's unexpected by the client. Needs further thought.
@davidbrochart This actually doesn't work in it's current iteration because _roots gets updated lazily when calling get(). Have you had any thoughts about how _roots maybe could be kept in...
> Sorry @mnbbrown I'm a bit low on bandwidth currently, but excited to see what you're doing. No worries! I know how it is :) I think this is ready...
Amazingly detailed answer - really appreciate it! Wrapping my head around lifetimes (and references not just being pointers) is proving challenging but I've made a lot of progress in 48...