Globally setting TokenSelectionBiases (logit_bias) when invoking a function #4503
Replies: 1 comment
|
I am cleaning up old unanswered discussions |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Use Case
We have a set of plugins and functions which we would like to globally and dynamically inject a set of
TokenSelectionBiasesto ban or reduce the occurrence of specific tokens.Analysis
My first attempt was via the
KernelArgumentsconstructor. However, the observation here is that if I pass inOpenAIPromptExecutionSettingsto theKernelArgumentsconstructor, it wipes out the configuration that was loaded when the prompt is imported viaImportPluginFromPromptDirectory.In other words, the
execution_settingsloaded via importing the plugin are replaced entirely.My second attempt was via the
FunctionInvokingevent delegate before invoking:However, the
execution_settingsare nowhere to be found and in fact, this makes sense becauseargs.Arguments.ExecutionSettingsdoesn't contain theexecution_settingsin theconfig.json.Question
Given that, is there a mechanism to globally inject a dynamically created
TokenSelectionBias(logit_bias) for all executions?Where are the
execution_settingsfrom theconfig.jsonstored?Can they be modified programmatically after loading?
All reactions