Socket
Book a DemoInstallSign in
Socket

@gel/vercel-ai-provider

Package Overview
Dependencies
Maintainers
2
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gel/vercel-ai-provider

Provider for the Vercel AI SDK

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
2
Created
Source

Provider for the Vercel AI SDK

The provider for the Vercel AI SDK contains language model support for the OpenAi, Mistral and Anthropic chat and completion APIs that implements Gel RAG, and embedding model support for the OpenAI and Mistral embeddings API.

Setup

Provider is available in the @gel/vercel-ai-provider module. You can install it with:

npm i @gel/vercel-ai-provider

Provider Instance

You can import the default provider instance gel from @gel/vercel-ai-provider:

import { gel } from "@gel/vercel-ai-provider";

Example

import { generateText } from "ai";
import { createClient } from "gel";
import { gel } from "@gel/vercel-ai-provider";

const textModel = (await gel).languageModel("gpt-4-turbo-preview", {
  context: { query: "your context" },
});

const { text } = await generateText({
  model: textModel,
  prompt: "your prompt",
});

console.log(text);

Documentation

Please check out the Gel provider documentation for more information.

Keywords

ai

FAQs

Package last updated on 23 Feb 2025

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