CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-com-embabel-agent--embabel-agent-openai

OpenAI compatible model factory for the Embabel Agent Framework

Overview
Eval results
Files

index.mddocs/

Embabel Agent OpenAI

OpenAI-compatible model factory for the Embabel Agent Framework. Supports OpenAI and any OpenAI-compatible API (Azure OpenAI, local models, etc.).

Installation

Maven:

<dependency>
    <groupId>com.embabel.agent</groupId>
    <artifactId>embabel-agent-openai</artifactId>
    <version>0.3.3</version>
</dependency>

Gradle (Kotlin DSL):

implementation("com.embabel.agent:embabel-agent-openai:0.3.3")

30-Second Quick Start

import com.embabel.agent.openai.OpenAiCompatibleModelFactory
import com.embabel.common.ai.model.PricingModel
import io.micrometer.observation.ObservationRegistry
import java.time.LocalDate

// Create factory
val factory = OpenAiCompatibleModelFactory(
    baseUrl = null,  // Uses OpenAI default
    apiKey = "your-openai-api-key",
    completionsPath = null,
    embeddingsPath = null,
    observationRegistry = ObservationRegistry.create()
)

// Create LLM service
val llmService = factory.openAiCompatibleLlm(
    model = "gpt-4",
    pricingModel = PricingModel.usdPer1MTokens(30.0, 60.0),
    provider = "OpenAI",
    knowledgeCutoffDate = LocalDate.of(2023, 4, 1)
)

// Create embedding service
val embeddingService = factory.openAiCompatibleEmbeddingService(
    model = "text-embedding-3-small",
    provider = "OpenAI"
)

Documentation Structure

  • Quick Start Guide - Essential patterns to get started quickly
  • API Reference - Complete API documentation with all parameters
  • Options Converters - Choose the right converter for your model
  • Configuration - Authentication, endpoints, timeouts, observability, retries
  • Spring Integration - Using with Spring dependency injection
  • Common Use Cases - Real-world scenarios and patterns
  • Extending the Factory - Subclassing for custom behavior
  • Java Usage - Java-specific examples and patterns

Install with Tessl CLI

npx tessl i tessl/maven-com-embabel-agent--embabel-agent-openai

docs

api-reference.md

configuration.md

extending.md

index.md

java-usage.md

options-converters.md

quickstart.md

spring-integration.md

use-cases.md

tile.json