Detailed changes
@@ -1,3 +1,4 @@
+// Package cerebras provides a Fantasy provider for the Cerebras Inference API.
package cerebras
import (
@@ -6,12 +7,16 @@ import (
)
const (
+ // Name is the provider identifier for Cerebras.
Name = "cerebras"
+ // BaseURL is the default Cerebras API base URL.
BaseURL = "https://api.cerebras.ai/v1"
)
+// Option configures the Cerebras provider via OpenAI-compatible options.
type Option = openaicompat.Option
+// New creates a new Cerebras provider using OpenAI-compatible transport/options.
func New(opts ...Option) (fantasy.Provider, error) {
options := []Option{
openaicompat.WithName(Name),
@@ -1,3 +1,4 @@
+// Package groq provides a Fantasy provider for the Groq API.
package groq
import (
@@ -6,12 +7,16 @@ import (
)
const (
+ // Name is the provider identifier for Groq.
Name = "groq"
+ // BaseURL is the default Groq API base URL.
BaseURL = "https://api.groq.com/openai/v1"
)
+// Option configures the Groq provider via OpenAI-compatible options.
type Option = openaicompat.Option
+// New creates a new Groq provider using OpenAI-compatible transport/options.
func New(opts ...Option) (fantasy.Provider, error) {
options := []Option{
openaicompat.WithName(Name),
@@ -1,3 +1,4 @@
+// Package huggingface provides a Fantasy provider for the Hugging Face Inference API.
package huggingface
import (
@@ -6,12 +7,16 @@ import (
)
const (
+ // Name is the provider identifier for Hugging Face.
Name = "huggingface"
+ // BaseURL is the default Hugging Face Inference API base URL.
BaseURL = "https://router.huggingface.co/v1"
)
+// Option configures the Hugging Face provider via OpenAI-compatible options.
type Option = openaicompat.Option
+// New creates a new Hugging Face provider using OpenAI-compatible transport/options.
func New(opts ...Option) (fantasy.Provider, error) {
options := []Option{
openaicompat.WithName(Name),
@@ -1,3 +1,4 @@
+// Package xai provides a Fantasy provider for the xAI API.
package xai
import (
@@ -6,12 +7,16 @@ import (
)
const (
+ // Name is the provider identifier for xAI.
Name = "xai"
+ // BaseURL is the default xAI API base URL.
BaseURL = "https://api.x.ai/v1"
)
+// Option configures the xAI provider via OpenAI-compatible options.
type Option = openaicompat.Option
+// New creates a new xAI provider using OpenAI-compatible transport/options.
func New(opts ...Option) (fantasy.Provider, error) {
options := []Option{
openaicompat.WithName(Name),
@@ -1,3 +1,4 @@
+// Package zai provides a Fantasy provider for the Z.ai Coding PaaS API.
package zai
import (
@@ -6,12 +7,16 @@ import (
)
const (
+ // Name is the provider identifier for Z.ai.
Name = "zai"
+ // BaseURL is the default Z.ai Coding PaaS API base URL.
BaseURL = "https://api.z.ai/api/coding/paas/v4"
)
+// Option configures the Z.ai provider via OpenAI-compatible options.
type Option = openaicompat.Option
+// New creates a new Z.ai provider using OpenAI-compatible transport/options.
func New(opts ...Option) (fantasy.Provider, error) {
options := []Option{
openaicompat.WithName(Name),