diff --git a/src/constants/function_calling.ts b/src/constants/function_calling.ts index f6466af..529556c 100644 --- a/src/constants/function_calling.ts +++ b/src/constants/function_calling.ts @@ -16,6 +16,71 @@ export interface UserProfileParams { }; conversation_context?: string[]; } +export const saveUserProfileTools = { + name: 'saveUserProfile', + description: + 'Saves user profile data, preferences, and other relevant facts to the database', + parameters: { + type: 'object', + properties: { + userId: { + type: 'string', + description: 'The unique ID of the user', + }, + name: { + type: 'string', + description: 'The name of the user', + }, + age: { + type: 'integer', + description: "The user's age", + }, + preferences: { + type: 'object', + description: "The user's preferences (favorite things, likes)", + properties: { + favorite_color: { + type: 'string', + description: "The user's favorite color", + }, + favorite_food: { + type: 'string', + description: "The user's favorite food", + }, + hobbies: { + type: 'array', + items: { + type: 'string', + }, + description: "The user's hobbies or interests", + }, + }, + }, + things_to_do: { + type: 'array', + items: { + type: 'string', + }, + description: 'Things the user wants to do or plans to do', + }, + things_done: { + type: 'array', + items: { + type: 'string', + }, + description: 'Things the user has done', + }, + things_to_do_later: { + type: 'array', + items: { + type: 'string', + }, + description: 'Tasks the user needs to complete later', + }, + }, + required: ['userId', 'name'], + }, +}; // export const saveUserProfileTools = { // name: 'saveUserProfile', @@ -99,99 +164,99 @@ export interface UserProfileParams { // }, // }; -export const saveUserProfileTools = { - name: 'saveUserProfile', - description: - 'Saves user profile data, preferences, and conversation facts into the database. This includes user device information, recent activities, and more.', - parameters: { - type: 'object', - properties: { - userId: { - type: 'string', - description: 'The unique ID of the user. This is a required field.', - }, - name: { - type: 'string', - description: 'The name of the user. This is a required field.', - }, - age: { - type: 'integer', - description: "The user's age (optional).", - minimum: 0, // Ensure age is a non-negative value - }, - location: { - type: 'string', - description: - "The user's location (optional). Could be city, country, etc.", - }, - preferences: { - type: 'object', - description: "The user's preferences, such as favorite things.", - properties: { - favorite_color: { - type: 'string', - description: "The user's favorite color.", - }, - favorite_food: { - type: 'string', - description: "The user's favorite food.", - }, - preferred_language: { - type: 'string', - description: "The user's preferred language for communication.", - }, - hobbies: { - type: 'array', - items: { - type: 'string', - }, - description: "The user's hobbies or interests (optional).", - }, - }, - }, - recent_activities: { - type: 'array', - items: { - type: 'string', - }, - description: - 'A list of recent actions or activities the user has taken (optional).', - }, - device_info: { - type: 'object', - description: "Information about the user's device (optional).", - properties: { - device_type: { - type: 'string', - description: 'The type of device (e.g., mobile, desktop, tablet).', - }, - os: { - type: 'string', - description: - "The operating system running on the user's device (e.g., iOS, Android, Windows).", - }, - browser: { - type: 'string', - description: 'The browser used by the user (e.g., Chrome, Safari).', - }, - screen_resolution: { - type: 'string', - description: "The user's screen resolution (e.g., 1920x1080).", - }, - }, - }, - conversation_context: { - type: 'array', - items: { - type: 'string', - }, - description: - 'Relevant facts and contexts gathered from the current conversation.', - }, - }, - required: ['userId', 'name'], // Making userId and name required - }, -}; +// export const saveUserProfileTools = { +// name: 'saveUserProfile', +// description: +// 'Saves user profile data, preferences, and conversation facts into the database. This includes user device information, recent activities, and more.', +// parameters: { +// type: 'object', +// properties: { +// userId: { +// type: 'string', +// description: 'The unique ID of the user. This is a required field.', +// }, +// name: { +// type: 'string', +// description: 'The name of the user. This is a required field.', +// }, +// age: { +// type: 'integer', +// description: "The user's age (optional).", +// minimum: 0, // Ensure age is a non-negative value +// }, +// location: { +// type: 'string', +// description: +// "The user's location (optional). Could be city, country, etc.", +// }, +// preferences: { +// type: 'object', +// description: "The user's preferences, such as favorite things.", +// properties: { +// favorite_color: { +// type: 'string', +// description: "The user's favorite color.", +// }, +// favorite_food: { +// type: 'string', +// description: "The user's favorite food.", +// }, +// preferred_language: { +// type: 'string', +// description: "The user's preferred language for communication.", +// }, +// hobbies: { +// type: 'array', +// items: { +// type: 'string', +// }, +// description: "The user's hobbies or interests (optional).", +// }, +// }, +// }, +// recent_activities: { +// type: 'array', +// items: { +// type: 'string', +// }, +// description: +// 'A list of recent actions or activities the user has taken (optional).', +// }, +// device_info: { +// type: 'object', +// description: "Information about the user's device (optional).", +// properties: { +// device_type: { +// type: 'string', +// description: 'The type of device (e.g., mobile, desktop, tablet).', +// }, +// os: { +// type: 'string', +// description: +// "The operating system running on the user's device (e.g., iOS, Android, Windows).", +// }, +// browser: { +// type: 'string', +// description: 'The browser used by the user (e.g., Chrome, Safari).', +// }, +// screen_resolution: { +// type: 'string', +// description: "The user's screen resolution (e.g., 1920x1080).", +// }, +// }, +// }, +// conversation_context: { +// type: 'array', +// items: { +// type: 'string', +// }, +// description: +// 'Relevant facts and contexts gathered from the current conversation.', +// }, +// }, +// required: ['userId', 'name'], // Making userId and name required +// }, +// }; export function saveUserProfile(params) { console.log(params); return JSON.stringify(params);