claude

package
v0.0.0-...-ed23b36 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLAUDE_V2      = "claude-2"
	CLAUDE_INSTANT = "claude-instant-1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaudeClient

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

func NewClaudeClient

func NewClaudeClient(apiKey string) *ClaudeClient

func (*ClaudeClient) Complete

func (c *ClaudeClient) Complete(input string) (*CompletionResponse, error)

type CompletionResponse

type CompletionResponse struct {
	Completion string `json:"completion"`
	StopReason string `json:"stop_reason"`
	Model      string `json:"model"`
}

type Request

type Request struct {
	Model             string `json:"model"`
	Prompt            string `json:"prompt"`
	MaxTokensToSample int    `json:"max_tokens_to_sample"`
}

Jump to

Keyboard shortcuts

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