Heroku AI SDK Provider - v0.4.3
    Preparing search index...

    Variable herokuConst

    heroku: {
        chat: (model: string) => HerokuChatLanguageModel;
        embedding: (model: string) => HerokuEmbeddingModel;
        image: (model: string) => HerokuImageModel;
    } = ...

    Type Declaration

    • chat: (model: string) => HerokuChatLanguageModel

      Creates a chat language model instance for the specified Heroku model.

      When chat API key is missing or model is unsupported

      const chatModel = heroku.chat("claude-4-sonnet");

      const { text } = await generateText({
      model: chatModel,
      prompt: "Explain quantum computing"
      });
    • embedding: (model: string) => HerokuEmbeddingModel

      Creates an embedding model instance for the specified Heroku model.

      When embeddings API key is missing or model is unsupported

      const embeddingModel = heroku.embedding("cohere-embed-multilingual");

      const { embedding } = await embed({
      model: embeddingModel,
      value: "Text to embed"
      });
    • image: (model: string) => HerokuImageModel

      Creates an image generation model instance for the specified Heroku model.

      When the image API key is missing or the model identifier is invalid

      const imageModel = heroku.image("stable-image-ultra");

      const { images } = await generateImage({
      model: imageModel,
      prompt: "A scenic view of mountains during sunrise"
      });