oneai

package
v0.0.0-...-d323686 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID     = "oneai"
	ApiKey = "api_key"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OneAI

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

func NewOneAI

func NewOneAI(apiKey string) *OneAI

func (*OneAI) Summarize

func (v *OneAI) Summarize(url string) (*Response, error)

type Response

type Response struct {
	InputText interface{} `json:"input_text"`
	Input     []struct {
		Utterance string `json:"utterance"`
	} `json:"input"`
	Status string      `json:"status"`
	Error  interface{} `json:"error"`
	Output []struct {
		TextGeneratedByStepName string      `json:"text_generated_by_step_name"`
		TextGeneratedByStepID   int         `json:"text_generated_by_step_id"`
		Text                    interface{} `json:"text"`
		Contents                []struct {
			Utterance string `json:"utterance"`
		} `json:"contents"`
	} `json:"output"`
	Warnings interface{} `json:"warnings"`
	Stats    struct {
		ConcurrencyWaitTime interface{} `json:"concurrency_wait_time"`
		TotalRunningJobs    int         `json:"total_running_jobs"`
		TotalWaitingJobs    int         `json:"total_waiting_jobs"`
	} `json:"stats"`
}

Jump to

Keyboard shortcuts

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