Eliassen.GroqCloud 0.1.85

This package has a SemVer 2.0.0 package version: 0.1.85+2.
dotnet add package Eliassen.GroqCloud --version 0.1.85                
NuGet\Install-Package Eliassen.GroqCloud -Version 0.1.85                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Eliassen.GroqCloud" Version="0.1.85" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Eliassen.GroqCloud --version 0.1.85                
#r "nuget: Eliassen.GroqCloud, 0.1.85"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Eliassen.GroqCloud as a Cake Addin
#addin nuget:?package=Eliassen.GroqCloud&version=0.1.85

// Install Eliassen.GroqCloud as a Cake Tool
#tool nuget:?package=Eliassen.GroqCloud&version=0.1.85                

Eliassen.GroqCloud

The Eliassen.GroqCloud library provides a set of classes and interfaces for interacting with the Groq Cloud API. This library allows developers to easily integrate the Groq Cloud service into their applications and utilize its AI-powered features.

Classes and Interfaces

The library consists of the following classes and interfaces:

  • GroqCloudApiClientFactory: A factory class for creating instances of the GroqClient class.
  • GroqCloudApiClientOptions: A class representing the configuration options for the GroqCloud API client.
  • GroqCloudHealthCheck: A class representing a health check implementation for the GroqCloud service.
  • GroqCloudMessageCompletion: A class responsible for generating message completions using the GroqCloud API.
  • GroqCloudModelMapper: A mapper interface for llama models.
  • IGroqCloudApiClientFactory: An interface representing a factory for creating instances of the GroqCloudApiClient.
  • IGroqCloudModelMapper: An interface representing a mapper interface for llama models.
  • ServiceCollectionExtensions: A class providing extension methods for configuring services related to GroqCloud.

Methods and Properties

The classes and interfaces in the library provide the following methods and properties:

  • GroqCloudApiClientFactory:
    • Constructor: Initializes a new instance of the GroqCloudApiClientFactory class with the specified options.
    • Build: Builds a new instance of the GroqClient class with the specified host.
  • GroqCloudApiClientOptions:
    • ApiKey: The API key used to authenticate with the Groq Cloud service.
    • Model: The model identifier for the AI model to be used. Defaults to "llama3-8b-8192".
  • GroqCloudHealthCheck:
    • Constructor: Initializes a new instance of the GroqCloudHealthCheck class.
    • CheckHealthAsync: Checks the health of the GroqCloud service asynchronously.
  • GroqCloudMessageCompletion:
    • Constructor: Initializes a new instance of the GroqCloudMessageCompletion class.
    • GetCompletionAsync: Generates a completion for the given prompt using the specified model.
    • GetCompletionAsync: Retrieves a completion for the given prompt from the specified model.
  • GroqCloudModelMapper:
    • Map: Maps a CompletionRequest model to a GroqChatHistory object.
    • Map: Maps a GroqChatCompletions object to a CompletionResponse object.
  • IGroqCloudApiClientFactory:
    • Build: Builds an instance of the GroqCloudApiClient for the specified host.
  • IGroqCloudModelMapper:
    • Map: Maps a CompletionRequest model to a GroqChatHistory object.
    • Map: Maps a GroqChatCompletions object to a CompletionResponse object.
  • ServiceCollectionExtensions:
    • TryAddGroqCloudServices: Configures services for GroqCloud.

Usage

To use the Eliassen.GroqCloud library, you can add it to your .NET project and use the provided classes and interfaces to interact with the Groq Cloud API. You can also use the ServiceCollectionExtensions class to configure services related to GroqCloud.

Configuration

The library provides options for configuring the GroqCloud API client, including the API key and model identifier. You can configure these options using the GroqCloudApiClientOptions class.

Health Checks

The library provides a health check implementation for the GroqCloud service using the GroqCloudHealthCheck class. You can use this class to check the health of the GroqCloud service asynchronously.

Message Completions

The library provides a class for generating message completions using the GroqCloud API, GroqCloudMessageCompletion. You can use this class to generate completions for given prompts using the specified model.

Model Mappers

The library provides a mapper interface for llama models, IGroqCloudModelMapper. You can use this interface to map CompletionRequest models to GroqChatHistory objects and vice versa.

Service Collection Extensions

The library provides extension methods for configuring services related to GroqCloud, ServiceCollectionExtensions. You can use these methods to add services for GroqCloud to your service collection.

I hope this README file helps you understand how to use the Eliassen.GroqCloud library. If you have any questions or need further assistance, please don't hesitate to reach out.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Eliassen.GroqCloud:

Package Downloads
Eliassen.Common.Extensions

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.85 55 10/10/2024
0.1.84 46 10/10/2024
0.1.83 47 9/27/2024
0.1.82 161 8/23/2024
0.1.81 134 8/1/2024
0.1.81-dev-gh-pipline.3 47 8/1/2024