nexus

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Package nexus adapts the Nexus LLM gateway to the cortex llm.Client interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EngineOption

func EngineOption(c vessel.Vessel) engine.Option

EngineOption returns an engine.Option that auto-discovers a Nexus gateway from the DI container and configures the engine's LLM client. If no gateway is found, returns a no-op option (safe to always include).

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

Adapter implements llm.Client by delegating to a nexus.Engine.

func New

func New(gw *nexus.Gateway) *Adapter

New creates a new Nexus adapter from a nexus.Gateway.

func (*Adapter) Complete

func (a *Adapter) Complete(ctx context.Context, req *llm.Request) (*llm.Response, error)

Complete sends a synchronous completion request via the Nexus pipeline.

func (*Adapter) CompleteStream

func (a *Adapter) CompleteStream(ctx context.Context, req *llm.Request) (llm.Stream, error)

CompleteStream sends a streaming completion request via the Nexus pipeline.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL