This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class IniFormatter : IFormatter | |
{ | |
public class IniTypeBinder : SerializationBinder | |
{ | |
public override Type BindToType(string assemblyName, string typeName) => Type.GetType(typeName.Split('=')[1]); | |
public override void BindToName(Type serializedType, out string assemblyName, out string typeName) | |
{ | |
assemblyName = $"{IniFormatter.AssemblyNameKey}={serializedType.Assembly.FullName}"; | |
typeName = $"{IniFormatter.ClassNameKey}={serializedType.AssemblyQualifiedName}"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ItemGroup> | |
<PackageReference Include="SmartComponents.AspNetCore" Version="0.1.0-preview10147" /> | |
<PackageReference Include="SmartComponents.Inference.OpenAI" Version="0.1.0-preview10147" /> | |
<PackageReference Include="SmartComponents.LocalEmbeddings" Version="0.1.0-preview10147" /> | |
</ItemGroup> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ApplyModel | |
{ | |
public string Name { get; set; } | |
public string Role { get; set; } | |
public string Credentials { get; set; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<EditForm Model="@applyModelSource" OnValidSubmit="SubmitAsync"> | |
<DataAnnotationsValidator /> | |
<ValidationSummary /> | |
<div class="form-group"> | |
<InputText @bind-Value="applyModelSource.Name" /> | |
</div> | |
<div class="form-group"> | |
<InputText @bind-Value="applyModelSource.Role" /> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
builder.Services.AddSmartComponents() | |
.WithInferenceBackend<CustomInferenceBackend>() | |
.WithAntiforgeryValidation(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"SmartComponents": { | |
"ApiKey": "AWTI4Cdf1YIcfu7SgHbvKdfpmEQkWFs8d8C3lfHXaawAIqq1lXM9JQQJ99BEAC5RqLJXJ3w3AAABACOGMbXv", | |
"DeploymentName": "gpt-4.1-nano", | |
"Endpoint": "https://akos.openai.azure.com/" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomSmartPasteInference : SmartPasteInference | |
{ | |
public override ChatParameters BuildPrompt(SmartPasteRequestData data) | |
{ | |
var prompt = base.BuildPrompt(data); | |
return prompt; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi Gopas, | |
My name is Akos Nagy. I'm writing to apply for the role AI trainer. I have a master's degree in computer engineering from the Budapest Unviersity of technology and economics and have passed Microsoft AI-900 and AI-102. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<SmartTextArea @bind-Value="@text" UserRole="@userRole" UserPhrases="@userPhrases"/> | |
@code { | |
private string? text; | |
private string userRole = "HR professional replying to applications for a role"; | |
private string[] userPhrases = [ | |
"Thank your for your interest in NEED_INFO", | |
"We have reviewed your application", | |
"Unfortunately we have decided not to move forward", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomSmartTextAreaInference : SmartTextAreaInference | |
{ | |
public override ChatParameters BuildPrompt( | |
SmartTextAreaConfig config, string textBefore, string textAfter) | |
{ | |
var prompt = base.BuildPrompt(config, textBefore, textAfter); | |
return prompt; | |
} | |
} |
OlderNewer