fptcloud

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package fptcloud provides an FPT Smart Cloud AI Marketplace language and embedding model implementation for GoAI, using the OpenAI-compatible endpoints.

The platform offers two regions: "global" (default, mkp-api.fptcloud.com) and "jp" (mkp-api.fptcloud.jp). Use WithRegion to switch.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chat

func Chat(modelID string, opts ...Option) provider.LanguageModel

Chat creates an FPT Smart Cloud language model for the given model ID.

func Embedding

func Embedding(modelID string, opts ...Option) provider.EmbeddingModel

Embedding creates an FPT Smart Cloud embedding model for the given model ID.

Types

type Option

type Option func(*options)

Option configures the FPT Smart Cloud provider.

func WithAPIKey

func WithAPIKey(key string) Option

WithAPIKey sets a static API key for authentication.

func WithBaseURL

func WithBaseURL(url string) Option

WithBaseURL overrides the region-derived base URL entirely.

func WithHTTPClient

func WithHTTPClient(c *http.Client) Option

WithHTTPClient sets a custom HTTP client for all requests.

func WithHeaders

func WithHeaders(h map[string]string) Option

WithHeaders sets additional HTTP headers sent with every request.

func WithRegion

func WithRegion(region string) Option

WithRegion selects the API region. Valid values: "global" (default) or "jp". Unknown values fall back to "global".

func WithTokenSource

func WithTokenSource(ts provider.TokenSource) Option

WithTokenSource sets a dynamic token source for authentication.

Jump to

Keyboard shortcuts

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