- Issue created by @marcus_johansson
-
marcus_johansson β
committed 8bdf37a7 on 3479388-research-normalize-function
Issue #3479388: Research normalize function calling in Chat operator
-
marcus_johansson β
committed 8bdf37a7 on 3479388-research-normalize-function
-
marcus_johansson β
committed 65477cb3 on 3479388-research-normalize-function
Issue #3479388: Research normalize function calling in Chat operator
-
marcus_johansson β
committed 65477cb3 on 3479388-research-normalize-function
-
marcus_johansson β
committed 9c1e9f27 on 3479388-research-normalize-function
Issue #3479388: Research normalize function calling in Chat operator
-
marcus_johansson β
committed 9c1e9f27 on 3479388-research-normalize-function
-
marcus_johansson β
committed 41425566 on 3479388-research-normalize-function
Issue #3479388: Research normalize function calling in Chat operator
-
marcus_johansson β
committed 41425566 on 3479388-research-normalize-function
-
marcus_johansson β
committed 35c3f460 on 3479388-research-normalize-function
Issue #3479388: Research normalize function calling in Chat operator
-
marcus_johansson β
committed 35c3f460 on 3479388-research-normalize-function
-
marcus_johansson β
committed 499c50a6 on 3479388-research-normalize-function
Issue #3479388: Research normalize function calling in Chat operator
-
marcus_johansson β
committed 499c50a6 on 3479388-research-normalize-function
- π©πͺGermany marcus_johansson
Draft merge request here: https://git.drupalcode.org/project/ai/-/merge_requests/277
- π©πͺGermany marcus_johansson
I will set this as in review for now, but we will not merge it until we have at least 2-3 providers prepared for it.
- Status changed to Needs review
about 2 months ago 7:18pm 8 December 2024 -
marcus_johansson β
committed dbf66f2a on 3479388-research-normalize-function
Issue #3479388: Research normalize function calling in Chat operator
-
marcus_johansson β
committed dbf66f2a on 3479388-research-normalize-function
-
marcus_johansson β
committed 41f4f2c9 on 3479388-research-normalize-function
Issue #3479388: Research normalize function calling in Chat operator
-
marcus_johansson β
committed 41f4f2c9 on 3479388-research-normalize-function
- π¬πͺGeorgia jibla
This approach looks well thought out and aligns well with the Drupal way of abstracting things. I just want to clarify a few points to make sure my understanding is correct:
- From what I gather, the approach involves creating plugins to expose functions that can be used in AI providers as function calls. These plugins essentially act as the lowest level of actions that can be executed as AI functions. I think this is a great opportunity to not only use them for AI providers but also extend them for other use cases, like agents, MCP tools, or even other integrations.
-
Using the
ChatTrait
βsgetTools()
setTools()
, it seems all provider implementations will have these methods (as base class uses this trait). If a provider doesnβt implement function calling, this wouldnβt lead to any breaking changes - this is important to make sure that its not breaking. -
Finally, it seems that AI providers themselves are responsible for implementing the actual function calling logic. So, if
getTools()
returns functions, the provider would handle their execution in its own way (load the plugin and then execute). So what they have to take care of is 1) register the functions and 2) if response has function calls, then call them right.
If all of the above is accurate, I think this is an excellent, drupal-friendly abstraction that provides flexibility. The only concern would be ensuring it doesn't introduce any breaking changes for providers that either donβt implement or donβt support function calling.