This file contains 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
class CustomSmartPasteInference : SmartPasteInference | |
{ | |
public override ChatParameters BuildPrompt(SmartPasteRequestData data) | |
{ | |
string text = "\nCurrent date: " + DateTime.Today.ToString("D", CultureInfo.InvariantCulture) + "\n\nEach response line matches the following format:\nFIELD identifier^^^value\n\nGive a response with the following lines only, with values inferred from USER_DATA:\n" + ToSimplifiedOutputExamples(data.FormFields) + "\nEND_RESPONSE\n\nDo not explain how the values were determined.\nFor fields without any corresponding information in USER_DATA, use value value NO_DATA."; | |
string text2 = "\nUSER_DATA: " + data.ClipboardContents + "\n"; | |
var prompt= new ChatParameters | |
{ | |
Messages = new List<ChatMessage>(2) | |
{ |
This file contains 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.AddSingleton<SmartPasteInference, CustomSmartPasteInference>(); | |
builder.Services.AddSmartComponents() | |
.WithInferenceBackend<OpenAIInferenceBackend>(); |
This file contains 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
class CustomSmartPasteInference : SmartPasteInference | |
{ | |
public override ChatParameters BuildPrompt(SmartPasteRequestData data) | |
{ | |
var prompt = base.BuildPrompt(data); | |
return prompt; | |
} | |
} |
This file contains 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
<form> | |
<!-- Removed the other fields --> | |
<smart-paste-button default-icon>Paste from clipboard</smart-paste-button> | |
</form> |
This file contains 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
<form> | |
<div class="form-group"> | |
<label for="title">Title</label> | |
<input type="text" class="form-control" id="title" name="title" required data-smartpaste-description="Oneliner summary describing the most important aspect of the identified bug"> | |
</div> | |
<div class="form-group"> | |
<label for="description">Description</label> | |
<textarea class="form-control" id="description" name="description" required></textarea> | |
</div> | |
<div class="form-group"> |
This file contains 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 CalculatorTests | |
{ | |
[Theory] | |
[MemberData(nameof(TestData))] | |
public void CanAdd(int value1, int value2, int expected) | |
{ | |
var calculator = new Calculator(); | |
var result = calculator.Add(value1, value2); | |
Assert.Equal(expected, result); | |
} |
This file contains 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 CalculatorTests | |
{ | |
[Theory] | |
[MemberData(nameof(TestData))] | |
public void CanAdd(int value1, int value2, int expected) | |
{ | |
var calculator = new Calculator(); | |
var result = calculator.Add(value1, value2); | |
Assert.Equal(expected, result); | |
} |
This file contains 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
trigger: | |
- main | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- task: AzureCLI@2 | |
inputs: | |
azureSubscription: '<Your-Azure-Subscription-Service-Connection>' |
This file contains 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
- name: Ensure resource group exists | |
uses: azure/CLI@v1 | |
with: | |
inlineScript: | | |
az group create -g ${{ secrets.RESOURCE_GROUP }} -l ${{ secrets.RESOURCE_GROUP_LOCATION }} | |
- name: Deploy Bicep | |
uses: azure/arm-deploy@v1 | |
with: | |
resourceGroupName: ${{ secrets.RESOURCE_GROUP }} | |
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }} |
This file contains 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
param name string | |
param location string = resourceGroup().location | |
resource astro_swa 'Microsoft.Web/staticSites@2022-09-01' = { | |
name: name | |
location: location | |
sku: { | |
name: 'Free' | |
tier: 'Free' | |
} |
NewerOlder