payload

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateChatRequestPayload

func CreateChatRequestPayload(model, instruction, userInput string) (string, error)

CreateChatRequestPayload constructs a basic chat request, using the config file and user's input https://platform.openai.com/docs/api-reference/chat/create

func CreateImageGenerationPayload added in v0.0.3

func CreateImageGenerationPayload(model, userInput string) (string, error)

CreateImageGenerationPayload asks the LLM to generate an image. If invoked, the url in config.json must point to the v1/images/generations API. For example: https://platform.openai.com/docs/api-reference/images

func CreateImageRequestPayload

func CreateImageRequestPayload(model, instruction string, imageUrl string) (string, error)

CreateImageRequestPayload downloads an image from URL, and provides it to the LLM via a base64 string it does this because some LLMs don't like downloading images from the internet, especially local LLMs https://platform.openai.com/docs/api-reference/chat/create

Types

This section is empty.

Jump to

Keyboard shortcuts

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