PreGenerateResponseEvent should allow altering of tags

Created on 5 November 2024, about 2 months ago

Problem/Motivation

Providers have the concept of "tags", which are strings stored against the provider when a call is made and which are added to the PreGenerateResponseEvent and PostGenerateResponseEvent events to assist users. There is currently no method for developers to alter these tags for existing code.

Proposed resolution

A setTags() method should be implemented on the PreGenerateResponseEvent event to allow developers using the event to alter the tags which are stored against the event, and the subsequent PostGenerateResponseEvent event. The PostGenerateResponseEvent is used by the AI Logging module to log data about the LLM call based on those tags, so it would make sense not to allow the changing of tags there as it may then get confusing.

The code in ProviderProxy::wrapperCall() should then take account of any added or deleted tags and set them against the provider, ready to be passed to the PostGenerateResponseEvent event.

Feature request
Status

Active

Version

1.0

Component

AI Core module

Created by

🇬🇧United Kingdom MrDaleSmith

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024