View Source WiseGPTEx.GroqHTTPClient (WiseGPTEx v0.8.0)
Provides functionalities to interact with the Groq API for chat completions.
Summary
Functions
Completes a chat prompt using Groq.
Functions
Completes a chat prompt using Groq.
Parameters
messages
- A string or an array of objects representing the chat prompts.opts
- Optional parameters for the request.
Returns
{:ok, completion}
on successful generation of completion.{:error, reason}
on failure, with details of the error.
Examples
iex> WiseGPTEx.GroqHTTPClient.complete("Hi")
{:ok, "Hello! How can I assist you today?"}
iex> WiseGPTEx.GroqHTTPClient.complete([%{"role" => "user", "content" => "Hi"}])
{:ok, "Hello! How can I assist you today?"}