cohere

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package cohere implements stream.Stream for Cohere.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*client.Client
}

Client cohere client.

func New

func New(config Config) *Client

New creates a new Client with the given Config.

func (*Client) Request

func (c *Client) Request(ctx context.Context, request proto.Request) stream.Stream

Request implements stream.Client.

type Config

type Config struct {
	AuthToken  string
	BaseURL    string
	HTTPClient *http.Client
}

Config represents the configuration for the Ollama API client.

func DefaultConfig

func DefaultConfig(authToken string) Config

DefaultConfig returns the default configuration for the Ollama API client.

type Stream

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

Stream is a cohere stream.

func (*Stream) CallTools

func (s *Stream) CallTools() []proto.ToolCallStatus

CallTools implements stream.Stream. Not supported.

func (*Stream) Close

func (s *Stream) Close() error

Close implements stream.Stream.

func (*Stream) Current

func (s *Stream) Current() (proto.Chunk, error)

Current implements stream.Stream.

func (*Stream) Err

func (s *Stream) Err() error

Err implements stream.Stream.

func (*Stream) Messages

func (s *Stream) Messages() []proto.Message

Messages implements stream.Stream.

func (*Stream) Next

func (s *Stream) Next() bool

Next implements stream.Stream.

Jump to

Keyboard shortcuts

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