Documentation
¶
Index ¶
- func CreateRequestBody(messages []t.MessageForLLM, messageParts []t.PartMessageForLLM, model string, ...) ([]byte, error)
- func GetReq(ctx context.Context, url string, headers map[string]string, ...) ([]byte, int, error)
- func PostReq(ctx context.Context, url string, headers map[string]string, body []byte, ...) ([]byte, int, error)
- func SplitAudio(audioPath string, chunkSize int) ([]string, string, error)
- func TranscribeGroq(model string, language string, apiKey string, audioURL *string, ...) (t.GroqTranscriptionResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRequestBody ¶
func CreateRequestBody( messages []t.MessageForLLM, messageParts []t.PartMessageForLLM, model string, temperature *float64, maxTokens *int, schema *t.StructuredOutputSchema, tools *[]t.ToolSchema, reasoning *t.ReasoningConfig, provider *t.ProviderConfig, ) ([]byte, error)
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.