vision

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Schema = types.JSONSchema{
		Property: types.Property{
			Type: "object",
		},
		Properties: map[string]types.Property{
			"base64": {
				Description: "The base64 encoded value of the image if an image URL is not specified",
				Type:        "string",
			},
			"contentType": {
				Description: `The content type of the image such as "image/jpeg" or "image/png"`,
				Type:        "string",
			},
			"text": {
				Description: "Instructions on how the passed image should be analyzed",
				Type:        "string",
			},
			"url": {
				Description: "The URL to the image to be processed. This should be set if base64 is not set",
				Type:        "string",
			},
		},
		Defs: map[string]types.JSONSchema{},
	}
)

Functions

func Base64FromStored

func Base64FromStored(cache *cache.Client, url string) (string, bool, error)

func ImageToURL

func ImageToURL(c *cache.Client, vision bool, message types.ImageURL) (string, error)

func ToVisionMessage

func ToVisionMessage(c *cache.Client, message types.CompletionMessage) (types.CompletionMessage, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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