glm

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2026 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package glm connects to the Zhipu GLM API.

Index

Constants

View Source
const (
	ProviderOptionDoSample  = "do_sample"
	ProviderOptionRequestID = "request_id"
	// ProviderOptionThinking is merged into the thinking object built from
	// Request.Thinking, e.g. {"clear_thinking": false}.
	ProviderOptionThinking   = "thinking"
	ProviderOptionToolStream = "tool_stream"
	ProviderOptionUserID     = "user_id"
)

Keys accepted in Request.ProviderOptions, sent as native request fields.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config = compat.Config

Config and Provider are shared with package compat.

type Provider added in v1.9.0

type Provider = compat.Provider

Config and Provider are shared with package compat.

func New

func New(cfg Config) (*Provider, error)

New connects to https://open.bigmodel.cn/api/paas/v4. Thinking maps to thinking.type "enabled" or "disabled" with Effort as reasoning_effort; BudgetTokens is rejected.

Jump to

Keyboard shortcuts

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