Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@formula-monks/kurt-vertex-ai

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formula-monks/kurt-vertex-ai

VertexAI plugin for Kurt - A wrapper for AI SDKs, for building LLM-agnostic structured AI applications

  • 1.6.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Kurt Adapter for Vertex AI

Kurt is a TypeScript library by Formula.Monks that wraps AI SDKs, making it easy to build structured LLM-based applications (RAG, agents, etc) that work with any LLM that supports structured output (via function calling features).

This package implements an adapter for Kurt that works with Vertex AI's Gemini models.

Read here for more information about Kurt.

Examples

This example code shows how to set up and use Kurt with Vertex AI.

import { Kurt } from "@formula-monks/kurt"
import { KurtVertexAI } from "@formula-monks/kurt-vertex-ai"
import { VertexAI } from "@google-cloud/vertexai"
import { z } from "zod"

const vertexAdapter = new KurtVertexAI({
  vertexAI: new VertexAI({
    project: process.env.VERTEX_AI_PROJECT ?? "my-project",
    location: process.env.VERTEX_AI_LOCATION ?? "us-central1",
  }),
  model: "gemini-1.0-pro", // or any other supported model
})

const kurt = new Kurt(vertexAdapter)

const stream = kurt.generateStructuredData({
  // or any other generation method
  prompt: "Say hello!",
  schema: z.object({
    say: z.string().describe("A single word to say"),
  }),
})

const { data } = await stream.result
console.log(data) // { say: "hello" }

FAQs

Package last updated on 10 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc