@@ -12,6 +12,54 @@ import {
1212 NetworkPortfolioLibResponse
1313} from '../types'
1414
15+ // import { z } from 'zod'
16+ // import { ACTION_OPERATION_TYPES, RISK_TYPES } from '..'
17+ // import { zodResponseFormat } from 'openai/helpers/zod'
18+
19+ // const ActionZodSchema = z.object({
20+ // tokens: z.string({
21+ // description:
22+ // 'Comma-separated list of symbols of the involved crypto currencies or tokens, for example: USDC, ETH'
23+ // }),
24+ // description: z.string({
25+ // description: 'Free text describing the action concerning the related tokens, the platform to use and expected APY'
26+ // }),
27+ // platforms: z.array(
28+ // z.string({
29+ // description: 'DeFi platform name'
30+ // }),
31+ // { description: 'The DeFi platform(s) which is to be used for the action' }
32+ // ),
33+ // networks: z.array(
34+ // z.string({
35+ // description: 'Lower-cased name of blockchain network'
36+ // }),
37+ // {
38+ // description:
39+ // 'The name of the blockchain network(s) which the action is to be executed on'
40+ // }
41+ // ),
42+ // operations: z.array(z.enum(ACTION_OPERATION_TYPES, { description: 'DeFi operation type' }), {
43+ // description: 'The DeFi operation type(s) used of the action'
44+ // }),
45+ // apy: z.string({
46+ // description:
47+ // 'The annual yield that can be expected from this action. Example values: 3%, 5%, 8-10%'
48+ // })
49+ // })
50+
51+ // const StrategyZodSchema = z.object({
52+ // name: z.string({ description: 'Name of the strategy' }),
53+ // risk: z.enum(RISK_TYPES, {
54+ // description: 'Risk level of the strategy'
55+ // }),
56+ // actions: z.array(ActionZodSchema, { description: 'List of actions for the strategy' })
57+ // })
58+
59+ // const StrategiesZodSchema = z.object({
60+ // strategies: z.array(StrategyZodSchema, { description: 'List of strategies' })
61+ // })
62+
1563export async function getPortfolioForNetwork (
1664 address : string ,
1765 networkId : string
@@ -68,7 +116,14 @@ export async function getPortfolioVelcroV3(address: string): Promise<PortfolioFo
68116}
69117
70118export const processAddress = async (
71- { address, getPortfolio, makePrompt, llmProcessor } : ProcessAddressProps = {
119+ {
120+ address,
121+ getPortfolio,
122+ makePrompt,
123+ llmProcessor,
124+ model,
125+ llmOptionsOverride
126+ } : ProcessAddressProps = {
72127 address : '0x69bfD720Dd188B8BB04C4b4D24442D3c15576D10' ,
73128 getPortfolio : getPortfolioVelcroV3 ,
74129 makePrompt : simplePrompt ,
@@ -94,7 +149,7 @@ export const processAddress = async (
94149 }
95150
96151 const prompt = await makePrompt ( { portfolio } )
97- const strategies = await llmProcessor ( { prompt } )
152+ const strategies = await llmProcessor ( { prompt, model , llmOptionsOverride } )
98153
99154 return {
100155 address,
0 commit comments