chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import * as common from '@botpress/common'
|
||||
import { z, InterfaceDefinition } from '@botpress/sdk'
|
||||
|
||||
export default new InterfaceDefinition({
|
||||
name: 'llm',
|
||||
version: '10.0.0',
|
||||
entities: {
|
||||
modelRef: {
|
||||
schema: common.llm.schemas.ModelRefSchema,
|
||||
},
|
||||
},
|
||||
events: {},
|
||||
actions: {
|
||||
generateContent: {
|
||||
billable: true,
|
||||
cacheable: true,
|
||||
input: {
|
||||
schema: ({ modelRef }) => common.llm.schemas.GenerateContentInputSchema(modelRef),
|
||||
},
|
||||
output: {
|
||||
schema: () => common.llm.schemas.GenerateContentOutputSchema,
|
||||
},
|
||||
},
|
||||
listLanguageModels: {
|
||||
input: {
|
||||
schema: () => z.object({}),
|
||||
},
|
||||
output: {
|
||||
schema: ({ modelRef }) =>
|
||||
z.object({
|
||||
models: z.array(z.intersection(common.llm.schemas.ModelSchema, modelRef)),
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
__advanced: {
|
||||
useLegacyZuiTransformer: true,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user