GenAI.BuildingBlocks
1.0.4
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package GenAI.BuildingBlocks --version 1.0.4
NuGet\Install-Package GenAI.BuildingBlocks -Version 1.0.4
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="GenAI.BuildingBlocks" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GenAI.BuildingBlocks --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GenAI.BuildingBlocks, 1.0.4"
#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 GenAI.BuildingBlocks as a Cake Addin #addin nuget:?package=GenAI.BuildingBlocks&version=1.0.4 // Install GenAI.BuildingBlocks as a Cake Tool #tool nuget:?package=GenAI.BuildingBlocks&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
No contexto do seu README, seria assim para cada bloco de c�digo:
```csharp
Obtenha a inst�ncia das interfaces:
_cadastroUsuarioRepository = InternalConfigurationDI.GetService<UserRepository>(connectionStringMongoDB, database);
_mongoQueryBuilder = InternalConfigurationDI.GetService<IMongoQueryBuilder>();
_teamsUtilities = InternalConfigurationDI.GetService<TeamsUtilities>(microsoftAppId, microsoftAppPassword, conversationId);
2. **Para o primeiro exemplo de uso**:
```markdown
```csharp
var messageUser = "Liste todos os usu�rios";
this.fnCallParameters.MessageUser = messageUser;
this.fnCallParameters.Model = new User();
var queryIA = await _mongoQueryBuilder.GetQueryFromIA<User>(fnCallParameters);
var response = await _mongoCommand.GetRunCommandAsyncToTable(queryIA);
3. **Para a implementa��o da classe `User`**:
```markdown
```csharp
[RuleConditionPrompt(Rule = "Regra 100", Condition = @"Lembre-se: voc� deve retornar todos os campos relacionados na cole��o cadastro_usuarios.")]
[RuleConditionPrompt(Rule = "Regra 101", Condition = @"Lembre-se da regra 100.")]
[Display(Name = "Cadastro de Usu�rios")]
[BsonCollection("cadastro_usuarios_teste_hml")]
public class User : BaseModel
{
[Display(Name = "ID")]
[JsonProperty(PropertyName = "_id")]
[BsonRepresentation(BsonType.String)]
public ObjectId Id { get; set; }
[Display(Name = "E-Mail")]
[JsonProperty(PropertyName = "Mail")]
public string Mail { get; set; }
}
4. **Para o exemplo de cria��o de inst�ncia**:
```markdown
```csharp
Utilize BaseMongoRepository para opera��es de reposit�rio.
Exemplo de Heran�a:
public class UserRepository: BaseMongoDBRepository<User>
{
public UserRepository(string connectionString, string databaseName) : base(connectionString, databaseName)
{
}
}
5. **Voc� pode enviar mensagens para o teams**:
```markdown
```csharp
Use a classe TeamsUtilities para isso.
Exemplo:
public async Task GetAndSendUserToTeams()
{
try
{
var messageUser = "Liste todos os usu�rios";
this.fnCallParameters.MessageUser = messageUser;
this.fnCallParameters.Model = new User();
var queryIA = await _mongoQueryBuilder.GetQueryFromIA<User>(fnCallParameters);
var response = await _mongoCommand.GetRunCommandAsyncToTable(queryIA);
response.AskUser = messageUser;
var html = response.ToHTML();
var result = await _teamsUtilities.SendMessageToTeams(html);
Assert.True(!string.IsNullOrEmpty(result.Id));
}
catch (Exception ex)
{
throw ex;
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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.
-
net6.0
- Azure.AI.OpenAI (>= 1.0.0-beta.7)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 6.0.0)
- Microsoft.Bot.Builder.Azure (>= 4.20.1)
- Microsoft.Bot.Builder.Azure.Blobs (>= 4.20.1)
- Microsoft.Bot.Builder.Dialogs (>= 4.20.1)
- Microsoft.Bot.Builder.Integration.AspNet.Core (>= 4.20.1)
- Microsoft.Bot.Connector (>= 4.21.2)
- Microsoft.Extensions.Caching.Memory (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection (>= 6.0.1)
- MongoDB.Driver (>= 2.23.1)
- NPOI (>= 2.6.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.