jina

package
v0.0.0-...-b7aeced Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(url string, options ...Option) (*Client, error)

func (*Client) Segment

func (c *Client) Segment(ctx context.Context, input string, options *segmenter.SegmentOptions) ([]segmenter.Segment, error)

type Option

type Option func(*Client)

func WithClient

func WithClient(client *http.Client) Option

func WithToken

func WithToken(token string) Option

type SegmentRequest

type SegmentRequest struct {
	Content string `json:"content"`

	ReturnChunks bool `json:"return_chunks,omitempty"`

	MaxChunkLength int `json:"max_chunk_length,omitempty"`
}

type SegmentResponse

type SegmentResponse struct {
	Chunks []string `json:"chunks"`
}

Jump to

Keyboard shortcuts

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