providers

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

README

providers

Internal package providers implements API clients for various AI model providers.

providers

import "github.com/agentstation/starmap/internal/sources/providers"

Index

type Source

Source fetches models from all provider APIs concurrently.

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

func New
func New(providers *catalogs.Providers) *Source

New creates a new provider API source with the given provider configurations.

func (*Source) Catalog
func (s *Source) Catalog() catalogs.Catalog

Catalog returns the catalog of this source.

func (*Source) Cleanup
func (s *Source) Cleanup() error

Cleanup releases any resources.

func (*Source) Dependencies
func (s *Source) Dependencies() []sources.Dependency

Dependencies returns the list of external dependencies. Provider source has no external dependencies.

func (*Source) Fetch
func (s *Source) Fetch(ctx context.Context, opts ...sources.Option) error

Fetch creates a new catalog with models fetched from all provider APIs concurrently.

func (*Source) ID
func (s *Source) ID() sources.ID

ID returns the ID of this source.

func (*Source) IsOptional
func (s *Source) IsOptional() bool

IsOptional returns whether this source is optional. Provider source is required - it's the core data source.

func (*Source) Name
func (s *Source) Name() string

Name returns the human-friendly name of this source.

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

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

Source fetches models from all provider APIs concurrently.

func New

func New(providers *catalogs.Providers) *Source

New creates a new provider API source with the given provider configurations.

func (*Source) Catalog

func (s *Source) Catalog() catalogs.Catalog

Catalog returns the catalog of this source.

func (*Source) Cleanup

func (s *Source) Cleanup() error

Cleanup releases any resources.

func (*Source) Dependencies added in v0.0.17

func (s *Source) Dependencies() []sources.Dependency

Dependencies returns the list of external dependencies. Provider source has no external dependencies.

func (*Source) Fetch

func (s *Source) Fetch(ctx context.Context, opts ...sources.Option) error

Fetch creates a new catalog with models fetched from all provider APIs concurrently.

func (*Source) ID added in v0.0.15

func (s *Source) ID() sources.ID

ID returns the ID of this source.

func (*Source) IsOptional added in v0.0.17

func (s *Source) IsOptional() bool

IsOptional returns whether this source is optional. Provider source is required - it's the core data source.

func (*Source) Name added in v0.0.17

func (s *Source) Name() string

Name returns the human-friendly name of this source.

Directories

Path Synopsis
Package anthropic provides a client for the Anthropic API.
Package anthropic provides a client for the Anthropic API.
Package google provides a unified, dynamic client for Google AI APIs (AI Studio and Vertex AI).
Package google provides a unified, dynamic client for Google AI APIs (AI Studio and Vertex AI).
Package openai provides a unified, dynamic client for OpenAI-compatible APIs.
Package openai provides a unified, dynamic client for OpenAI-compatible APIs.
Package testhelper provides utilities for managing testdata files in provider tests.
Package testhelper provides utilities for managing testdata files in provider tests.

Jump to

Keyboard shortcuts

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