helpers

package
v1.0.1-0...-2982e63 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRequestBody

func CreateRequestBody(
	messages []t.MessageForLLM,
	model string,
	temperature *float64,
	maxTokens *int,
	schema *t.StructuredOutputSchema,
	tools *[]t.ToolSchema,
	reasoning *t.ReasoningConfig,
	provider *t.ProviderConfig,
) []byte

func GetReq

func GetReq(
	ctx context.Context,
	url string,
	headers map[string]string,
	client *http.Client,
) ([]byte, int, error)

GetReq requires a context and url, other parameters are optional. Returns the response body as bytes, the HTTP status code and any error. HTTP status code 0 means an error / cancellation occured before any request was sent.

func PostReq

func PostReq(
	ctx context.Context,
	url string,
	headers map[string]string,
	body []byte,
	client *http.Client,
) ([]byte, int, error)

PostReq requires a context and url, other parameters are optional. Returns the response body as bytes, the HTTP status code and any error. HTTP status code 0 means an error / cancellation occured before any request was sent.

func SplitAudio

func SplitAudio(audioPath string, chunkSize int) ([]string, string, error)

func TranscribeGroq

func TranscribeGroq(
	model string,
	language string,
	apiKey string,
	audioURL *string,
	audioBytes *[]byte,
	timeOut *int,
) (t.GroqTranscriptionResponse, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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