Skip to content

Commit

Permalink
update ci (#1)
Browse files Browse the repository at this point in the history
* update ci

* add name
  • Loading branch information
LittleLittleCloud committed Apr 26, 2024
1 parent 75ba9e2 commit 30c7ff6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/dotnet-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
build:
name: Build and release
runs-on: ubuntu-latest
environment: dotnet
steps:
- uses: actions/checkout@v4
- name: Setup .NET
Expand All @@ -37,11 +36,6 @@ jobs:
dotnet build --no-restore --configuration Release -bl /p:SignAssembly=true
- name: Unit Test
run: dotnet test --no-build -bl --configuration Release
env:
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
AZURE_GPT_35_MODEL_ID: ${{ secrets.AZURE_GPT_35_MODEL_ID }}
OEPNAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- name: Pack
run: |
echo "Create release build package"
Expand Down
6 changes: 3 additions & 3 deletions PowershellRunnerAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ public Task<IMessage> GenerateReplyAsync(IEnumerable<IMessage> messages, Generat
var errorMessage = powershell.Streams.Error.Select(e => e.ToString()).Aggregate((a, b) => $"{a}\n{b}");
errorMessage = @$"[ERROR]
{errorMessage}";
return Task.FromResult<IMessage>(new TextMessage(Role.Assistant, errorMessage));
return Task.FromResult<IMessage>(new TextMessage(Role.Assistant, errorMessage, from: this.Name));
}
else
{
var successMessage = powershell.Streams.Information.Select(e => e.ToString()).Aggregate((a, b) => $"{a}\n{b}");
var successMessage = powershell.Streams.Information?.Select(e => e.ToString()).Aggregate((a, b) => $"{a}\n{b}") ?? "no output";
successMessage = @$"[SUCCESS]
{successMessage}";

return Task.FromResult<IMessage>(new TextMessage(Role.Assistant, successMessage));
return Task.FromResult<IMessage>(new TextMessage(Role.Assistant, successMessage, from: this.Name));
}
// // save the script to a temporary file which has a .ps1 extension
// var tempFile = Path.GetTempFileName();
Expand Down
8 changes: 6 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ The workflow can be easily extended to support the following scenarios:
- approve script before execution: Asking user for approval before executing the script.
- support more bash languages: Adding more engineers!

### Example
Below is an example of how the workflow works, the question being asked is "listing all files and its size, and sort by size in descending order".
### Examples
Below are some examples of the tasks that can be resolved using this workflow.

#### listing all files and its size, and sort by size in descending order.
![Example](asset/output.gif)

#### switch to light theme

0 comments on commit 30c7ff6

Please sign in to comment.