Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export enum StrategyRisk {
export type StrategyAction = {
tokens: string
description: string
platforms?: string[]
platforms?: Array<{ name: string; url: string }>
networks?: string[]
operations?: string[]
apy?: string
Expand Down
19 changes: 15 additions & 4 deletions lib/utils/llm/structures/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,22 @@ export const ActionGoogleSchema: Schema = {
},
platforms: {
type: SchemaType.ARRAY,
description: 'The DeFi platform(s) which is to be used for the action',
description: 'The DeFi platform(s) to be used for the action',
items: {
type: SchemaType.STRING,
description: 'DeFi platform name',
nullable: false
type: SchemaType.OBJECT,
properties: {
name: {
type: SchemaType.STRING,
description: 'DeFi platform name',
nullable: false
},
url: {
type: SchemaType.STRING,
description: 'Verified HTTPS URL of the DeFi platform',
nullable: false
}
},
required: ['name', 'url']
}
},
networks: {
Expand Down
11 changes: 8 additions & 3 deletions lib/utils/llm/structures/zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ export const ActionZodSchema = z.object({
'Free text describing the action concerning the related tokens, the platform to use and expected APY'
}),
platforms: z.array(
z.string({
description: 'DeFi platform name'
z.object({
name: z.string({
description: 'DeFi platform name'
}),
url: z.string({
description: 'Verified HTTPS URL of the DeFi platform'
})
}),
{ description: 'The DeFi platform(s) which is to be used for the action' }
{ description: 'The DeFi platform(s) to be used for the action' }
),
networks: z.array(
z.string({
Expand Down