Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/assets/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ The MaIN CLI (`mcli`) is your companion tool for managing AI workflows and servi
> - Set execution policies
> - Create uninstaller

Download and unpack content from this link [Download](https://1drv.ms/u/c/8dd72529df58a475/EXWkWN8pJdcggI1tAAAAAAABD0eIFVX7HhjwDubuEr1T9w?e=m0daA8)
Download and unpack content from this link [Download](https://1drv.ms/u/c/8dd72529df58a475/EXWkWN8pJdcggI1tAAAAAAABD0eIFVX7HhjwDubuEr1T9w?e=63TNH0)

```bash
.\install-mcli.ps1
```

### (Linux/Mac)
Download and unpack content from this link [Download](https://1drv.ms/u/c/8dd72529df58a475/EXWkWN8pJdcggI1zAAAAAAABMMmdRp0OgzMEwBFB4Gftvg?e=ilXsHh)
Download and unpack content from this link [Download](https://1drv.ms/u/c/8dd72529df58a475/EXWkWN8pJdcggI1zAAAAAAABMMmdRp0OgzMEwBFB4Gftvg?e=vz96CR)
> - You might need some sudo permissions to set default model path or run api scripts

```bash
Expand Down
13 changes: 13 additions & 0 deletions src/assets/docs/docs-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@
"path": "examples/example-chat-reasoning-deepseek"
}
]
},
{
"title": "GroqCloud Integration",
"children": [
{
"title": "Basic chat",
"path": "examples/example-chat-basic-groqcloud"
}
]
}
]
},
Expand Down Expand Up @@ -205,6 +214,10 @@
{
"title": "DeepSeek",
"path": "integrations/deepseek"
},
{
"title": "GroqCloud",
"path": "integrations/groqcloud"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion src/assets/docs/examples/example-chat-basic-gemini.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ public async Task Start()
4. **Send a message** → `.WithMessage("Is the killer whale the smartest animal?")`
5. **Run the chat** → `.CompleteAsync(interactive: true);`

This example demonstrates how effortlessly Gemini's Gemini's 2.0-flash model can be integrated into the framework, enabling seamless interactions with just a few lines of code. The simplicity of setup and ease of use makes it ideal for developers looking to integrate powerful AI capabilities with minimal configuration.
This example demonstrates how effortlessly Gemini's 2.0-flash model can be integrated into the framework, enabling seamless interactions with just a few lines of code. The simplicity of setup and ease of use makes it ideal for developers looking to integrate powerful AI capabilities with minimal configuration.
27 changes: 27 additions & 0 deletions src/assets/docs/examples/example-chat-basic-groqcloud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 💬 GroqCloud Chat Example

The **GroqCloudChatExample** demonstrates how to integrate GroqCloud's LLaMA 3 model into the framework with minimal setup, showcasing its performance and simplicity for interactive chat.

### 📝 Code Example

```csharp
public async Task Start()
{
GroqCloudExample.Setup(); //We need to provide GroqCloud API key
Console.WriteLine("(GroqCloud) ChatExample is running!");

await AIHub.Chat()
.WithModel("llama3-8b-8192")
.WithMessage("Which color do people like the most?")
.CompleteAsync(interactive: true);
}
```

## 🔹 How It Works
1. **Set up GroqCloud API** → `GroqCloudExample.Setup()` (API key is required)
2. **Initialize a chat session** → `AIHub.Chat()`
3. **Choose a model** → `.WithModel("llama3-8b-8192")`
4. **Send a message** → `.WithMessage("Which color do people like the most?")`
5. **Run the chat** → `.CompleteAsync(interactive: true);`

This example demonstrates how effortlessly GroqCloud's LLAMA 3 model can be integrated into the framework, enabling seamless interactions with just a few lines of code. The simplicity of setup and ease of use makes it ideal for developers looking to integrate powerful AI capabilities with minimal configuration.
2 changes: 1 addition & 1 deletion src/assets/docs/integrations/deepseek.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Once you configure DeepSeek as the backend, **everything in the MaIN framework w

- **No additional configuration is required** to use DeepSeek with any MaIN-based feature.
- Whether you're interacting with chat models, agents, or external data sources, the behavior remains consistent.
- The integration allows MaIN to work seamlessly with Gemini, enabling you to use the full power of the framework without worrying about backend-specific configurations.
- The integration allows MaIN to work seamlessly with DeepSeek, enabling you to use the full power of the framework without worrying about backend-specific configurations.

---

Expand Down
103 changes: 103 additions & 0 deletions src/assets/docs/integrations/groqcloud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# 🧠 GroqCloud Integration with MaIN Framework

This documentation provides a quick guide for integrating GroqCloud into your MaIN-based application. The integration process is simple and ensures that everything in the MaIN framework works seamlessly with GroqCloud as the backend, without requiring any additional modifications to existing functionality.

## 🚀 Quick Start

Integrating GroqCloud with MaIN requires minimal configuration. All you need to do is specify your GroqCloud API key and set the backend type to GroqCloud. Once this is done, you can use the full functionality of the MaIN framework, and everything will work as expected, without the need for further adjustments.

### 📝 Code Example

#### Using `appsettings.json`

To configure GroqCloud in your `appsettings.json`, add the following section:

```json
{
"MaIN": {
"BackendType": "GroqCloud",
"GroqCloudKey": "<YOUR_GROQ_KEY>"
}
}
```

#### Simple Console Initialization

Alternatively, you can set the backend type and GroqCloud key programmatically during initialization using `MaINBootstrapper.Initialize`:

```csharp
MaINBootstrapper.Initialize(configureSettings: (options) =>
{
options.BackendType = BackendType.GroqCloud;
options.GroqCloudKey = "<YOUR_GROQ_KEY>";
});
```

#### Using ServiceBuilder for API-based Use Cases

If you're setting up MaIN in an API or web-based application (e.g., ASP.NET Core), you can configure it using `ServiceBuilder`:

```csharp
services.AddMaIN(configuration, (options) =>
{
options.BackendType = BackendType.GroqCloud;
options.GroqCloudKey = "<YOUR_GROQ_KEY>";
});
```

### 📦 Using Environment Variables

If you prefer not to store your GroqCloud key in your `appsettings.json` or directly in the code, you can set it using an environment variable. This will automatically be detected by the MaIN framework.

For example, you can set the `GROQ_API_KEY` environment variable in different platforms:

- **On Windows (Command Prompt):**

```bash
set GROQ_API_KEY=<YOUR_GROQ_KEY>
```

- **On Windows (PowerShell):**

```bash
$env:GROQ_API_KEY="<YOUR_GROQ_KEY>"
```

- **On macOS/Linux:**

```bash
export GROQ_API_KEY=<YOUR_GROQ_KEY>
```

This way, you can securely store your API key in the environment without the need for hardcoding it.

---

## 🔹 What’s Included with GroqCloud Integration

Once you configure GroqCloud as the backend, **everything in the MaIN framework works the same way**. This includes all the core functionality such as chat, agents, and data retrieval tasks, which continue to operate without needing any special changes to the logic or structure.

- **No additional configuration is required** to use GroqCloud with any MaIN-based feature.
- Whether you're interacting with chat models, agents, or external data sources, the behavior remains consistent.
- The integration allows MaIN to work seamlessly with GroqCloud, enabling you to use the full power of the framework without worrying about backend-specific configurations.

---

## ⚠️ Important Considerations

When using GroqCloud models with the MaIN framework, please note these current limitations:

- Image Generation: GroqCloud models do not support direct image generation. Using features that rely on generating images will throw a `NotSupportedException`.
- Embeddings: GroqCloud models do not support generating embeddings (e.g., for file processing that requires text vectorization). Any MaIN functionality dependent on embeddings will result in a `NotSupportedException`.

Please ensure your application's design accounts for these limitations to prevent errors. If these functionalities are crucial for your application, you might want to consider using a different backend, such as OpenAI or Gemini.

---

## 🔧 Features

- **Simple Setup**: All you need to do is specify your GroqCloud key and set the backend type to GroqCloud, either via `appsettings.json`, environment variables, or programmatically.
- **Environment Variable Support**: Supports storing your GroqCloud key securely as an environment variable, making it easy to configure on different platforms.
- **Seamless Operation**: Once GroqCloud is configured, everything within the MaIN framework works identically with GroqCloud, with no need for adjustments or special handling for different tasks.

This integration ensures that your application remains flexible and easy to manage, allowing you to focus on using the features of MaIN while leveraging GroqCloud powerful capabilities.
Loading