gloq
Types
pub type GroqRequestBuilder {
GroqRequestBuilder(
key: String,
user: String,
context: String,
model: String,
)
}
Constructors
-
GroqRequestBuilder( key: String, user: String, context: String, model: String, )
Functions
pub fn default_groq_request() -> GroqRequestBuilder
Creates a new GroqRequestBuilder with default model and user values.
pub fn new_groq_request() -> GroqRequestBuilder
Create a new GroqRequestBuilder with no default values.
pub fn send(builder: GroqRequestBuilder) -> String
Sends the request to the GroqCloud API for chat completions.
pub fn with_context(
builder: GroqRequestBuilder,
context: String,
) -> GroqRequestBuilder
Sets the context/prompt for the GroqRequestBuilder.
pub fn with_key(
builder: GroqRequestBuilder,
key: String,
) -> GroqRequestBuilder
Enum of all models available for the GroqRequestBuilder. Sets the API key for the GroqRequestBuilder.
pub fn with_model(
builder: GroqRequestBuilder,
model: String,
) -> GroqRequestBuilder
Sets the model for the GroqRequestBuilder.