mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-14 20:59:57 +01:00
- Added '@nuxtjs/mdc' module to nuxt.config.ts for improved UI components. - Configured MDC settings to disable anchor links for headings. - Updated API proxy settings to include '/api/uses' and a general '/api/' endpoint. - Introduced new dependencies for AI SDKs and tools in package.json. - Created a new chat API endpoint to handle AI interactions with various tools. - Implemented utility functions for activity tracking, resource reading, resume retrieval, statistics, status monitoring, and categorized tool usage. - Updated social links in types/index.ts to redirect through a custom domain. - Updated worker configuration to include AI binding for Cloudflare.
16 lines
584 B
TypeScript
16 lines
584 B
TypeScript
import type { UIToolInvocation } from 'ai'
|
|
import { tool } from 'ai'
|
|
import { z } from 'zod'
|
|
|
|
export type ResumesUIToolInvocation = UIToolInvocation<typeof resumesTool>
|
|
|
|
export const resumesTool = tool({
|
|
description: 'Retrieves a direct download link to Arthur Danjou\'s professional resume in the specified language. Supports both English and French versions.',
|
|
inputSchema: z.object({
|
|
lang: z.enum(['en', 'fr']).describe('The language for the resume: \'en\' for English or \'fr\' for French.')
|
|
}),
|
|
execute: async ({ lang }) => {
|
|
return `/api/resumes/${lang}`
|
|
}
|
|
})
|