Documentation ¶
Overview ¶
Package integration provides utilities for integration with external systems, services, and frameworks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToOpenAIChatCompletionMessages ¶ added in v0.0.56
func ToOpenAIChatCompletionMessages(messages schema.ChatMessages) ([]openai.ChatCompletionMessage, error)
ToOpenAIChatCompletionMessages converts a slice of schema.ChatMessage to a slice of openai.ChatCompletionMessage. It extracts the necessary information from each message to create the corresponding OpenAI chat completion message.
Types ¶
type HTTPClient ¶ added in v0.0.58
type PartitionInput ¶ added in v0.0.85
PartitionInput represents the input for the Partition method.
type PartitionOutput ¶ added in v0.0.85
type PartitionOutput struct { Type string `json:"type"` ElementID string `json:"element_id"` Metadata struct { Filetype string `json:"filetype"` Languages []string `json:"languages"` PageNumber int `json:"page_number"` Filename string `json:"filename"` } `json:"metadata"` Text string `json:"text"` }
PartitionOutput represents the output of the Partition method.
type SerpAPIOptions ¶
type Unstructured ¶ added in v0.0.85
type Unstructured struct {
// contains filtered or unexported fields
}
Unstructured is a client for interacting with the Unstructured API.
func NewUnstructured ¶ added in v0.0.85
func NewUnstructured(apiKey string, optFns ...func(o *UnstructuredOptions)) *Unstructured
NewUnstructured creates a new Unstructured client with the provided API key.
func (*Unstructured) Partition ¶ added in v0.0.85
func (c *Unstructured) Partition(ctx context.Context, input *PartitionInput) ([]PartitionOutput, error)
Partition sends a file to the Unstructured API for partitioning and returns the partitioned content.
type UnstructuredOptions ¶ added in v0.0.85
type UnstructuredOptions struct { // BaseURL is the base URL of the Unstructured API. BaseURL string // HTTPClient is the HTTP client to use for making API requests. HTTPClient HTTPClient }
UnstructuredOptions represents options for configuring the Unstructured client.
type Wikipedia ¶ added in v0.0.4
type Wikipedia struct {
// contains filtered or unexported fields
}
func NewWikipedia ¶ added in v0.0.4
func NewWikipedia(optFns ...func(o *WikipediaOptions)) *Wikipedia
type WikipediaOptions ¶ added in v0.0.4
type WikipediaOptions struct { LanguageCode string TopK int DocMaxChars int HTTPClient HTTPClient }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package ai21 provides a client for interacting with the ai21 text completion API.
|
Package ai21 provides a client for interacting with the ai21 text completion API. |
Package ernie provides a client library for interacting with the Ernie API, which offers natural language processing (NLP) capabilities, including chat completion and text embedding.
|
Package ernie provides a client library for interacting with the Ernie API, which offers natural language processing (NLP) capabilities, including chat completion and text embedding. |
Package nbformat provides utilities to read and parse Jupyter Notebook (nbformat) files.
|
Package nbformat provides utilities to read and parse Jupyter Notebook (nbformat) files. |
Package sqldb provides an SQL database abstraction for performing queries and interacting with the database.
|
Package sqldb provides an SQL database abstraction for performing queries and interacting with the database. |