feat: modify body with ai & feedback on ai requests hoppscotch-common bindings (#4386)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
@@ -3,8 +3,30 @@ import * as E from "fp-ts/Either"
|
||||
export type ExperimentsPlatformDef = {
|
||||
aiExperiments?: {
|
||||
enableAIExperiments: boolean
|
||||
generateRequestName: (
|
||||
requestInfo: string
|
||||
) => Promise<E.Either<string, string>>
|
||||
generateRequestName?: (requestInfo: string) => Promise<
|
||||
E.Either<
|
||||
string,
|
||||
{
|
||||
request_name: string
|
||||
trace_id: string
|
||||
}
|
||||
>
|
||||
>
|
||||
modifyRequestBody?: (
|
||||
requestBody: string,
|
||||
userPrompt: string
|
||||
) => Promise<
|
||||
E.Either<
|
||||
string,
|
||||
{
|
||||
modified_body: string
|
||||
trace_id: string
|
||||
}
|
||||
>
|
||||
>
|
||||
submitFeedback?: (
|
||||
rating: -1 | 1,
|
||||
traceID: string
|
||||
) => Promise<E.Either<string, void>>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user