UNPKG

hataraku

Version:

An autonomous coding agent for building AI-powered development tools. The name "Hataraku" (働く) means "to work" in Japanese.

29 lines 1.21 kB
import { createVertex } from '@ai-sdk/google-vertex'; /** * Create a Google Vertex AI provider with the given configuration * @param project Google Cloud project ID (optional, defaults to environment variable) * @param location Google Cloud location (optional, defaults to 'us-central1') * @returns Google Vertex AI provider */ export async function createVertexProvider(project, location = 'us-central1') { const projectId = project || process.env.GOOGLE_CLOUD_PROJECT; if (!projectId) { throw new Error('GOOGLE_CLOUD_PROJECT is not set'); } return createVertex({ project: projectId, location }); } /** * Create a Google Vertex AI model with the given model name * @param model Model name (defaults to gemini-1.5-flash) * @param project Google Cloud project ID (optional, defaults to environment variable) * @param location Google Cloud location (optional, defaults to 'us-central1') * @returns Google Vertex AI model */ export async function createVertexModel(model = 'gemini-1.5-flash', project, location = 'us-central1') { const vertex = await createVertexProvider(project, location); return vertex(model); } //# sourceMappingURL=vertex.js.map