breaking change WIP

This commit is contained in:
Kosta Petan 2023-11-09 09:46:27 +00:00
parent eb490ed832
commit 77daf0c203
10 changed files with 58 additions and 28 deletions

View File

@ -13,8 +13,8 @@
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="1.0.0-beta5" />
<PackageReference Include="Testcontainers" Version="3.2.0" />
<ProjectReference Include="..\..\libs\Microsoft.AI.DevTeam.Skills\Microsoft.AI.DevTeam.Skills.csproj" />
</ItemGroup>

View File

@ -27,8 +27,8 @@
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.19.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.21.0" />
<PackageReference Include="Octokit.Webhooks.AzureFunctions" Version="2.0.3" />
<PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="1.0.0-beta5" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Storage" Version="5.0.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Tables" Version="1.2.0" />
<PackageReference Include="Octokit" Version="7.1.0" />

View File

@ -15,7 +15,7 @@
<ItemGroup>
<PackageReference Include="Octokit.Webhooks.AspNetCore" Version="2.0.3" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="1.0.0-beta5" />
<PackageReference Include="Microsoft.Orleans.Server" Version="7.2.1" />
<PackageReference Include="Microsoft.Orleans.Persistence.Cosmos" Version="7.2.1" />
<PackageReference Include="Microsoft.Orleans.Clustering.Cosmos" Version="7.2.1" />

View File

@ -12,8 +12,8 @@
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="1.0.0-beta5" />
<PackageReference Include="PdfPig" Version="0.1.8-alpha-20230529-6daa2" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.1" />
</ItemGroup>

View File

@ -21,8 +21,8 @@
<PackageReference Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="7.0.0" />
<PackageReference Include="AspNetCore.Authentication.ApiKey" Version="7.0.0" />
<PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />
<PackageReference Include="Microsoft.SemanticKernel.Connectors.Memory.Qdrant" Version="1.0.0-beta5" />
<ProjectReference Include="..\Microsoft.AI.DevTeam.Skills\Microsoft.AI.DevTeam.Skills.csproj" />
</ItemGroup>

View File

@ -48,21 +48,49 @@ public static class Developer {
public static SemanticFunctionConfig Explain = new SemanticFunctionConfig
{
PromptTemplate = """
You are a Software Developer.
Please explain the code that is in the input below. You can include references or documentation links in your explanation.
Also where appropriate please output a list of keywords to describe the code or its capabilities.
example:
Keywords: Azure, networking, security, authentication
You are an experienced software developer, with strong experience in Azure and Microsoft technologies.
Extract the key features and capabilities of the code file below, with the intent to build an understanding of an entire code repository.
You can include references or documentation links in your explanation. Also where appropriate please output a list of keywords to describe the code or its capabilities.
Example:
Keywords: Azure, networking, security, authentication
If the code's purpose is not clear output an error:
===code===
{{$input}}
===end-code===
Only include the points in a bullet point format and DON'T add anything outside of the bulleted list.
Be short and concise.
If the code's purpose is not clear output an error:
Error: The model could not determine the purpose of the code.
--
Input: {{$input}}
""",
Name = nameof(Explain),
SkillName = nameof(CodeExplainer),
Description = "From a description of a coding task out put the code or scripts necessary to complete the task.",
Description = "From a source file produce an explanation of what the code does",
MaxTokens = 6500,
Temperature = 0.0,
TopP = 0.0,
PPenalty = 0.0,
FPenalty = 0.0
};
public static SemanticFunctionConfig ConsolidateUnderstanding = new SemanticFunctionConfig
{
PromptTemplate = """
You are an experienced software developer, with strong experience in Azure and Microsoft technologies.
You are trying to build an understanding of the codebase from code files. This is the current understanding of the project:
===current-understanding===
{{$input}}
===end-current-understanding===
and this is the new information that surfaced
===new-understanding===
{{$newUnderstanding}}
===end-new-understanding===
Your job is to update your current understanding with the new information.
Only include the points in a bullet point format and DON'T add anything outside of the bulleted list.
Be short and concise.
""",
Name = nameof(Explain),
SkillName = nameof(CodeExplainer),
Description = "From a source file produce an explanation of what the code does",
MaxTokens = 6500,
Temperature = 0.0,
TopP = 0.0,
@ -70,3 +98,5 @@ public static class Developer {
FPenalty = 0.0
};
}

View File

@ -7,6 +7,6 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />
</ItemGroup>
</Project>

View File

@ -23,9 +23,7 @@ public class Ingester : SemanticPersona, IIngestRepo
var language = await _ghService.GetMainLanguage(org, repo);
var files = await _ghService.GetFiles(org, repo, branch, Language.Filters[language]);
var pm = GrainFactory.GetGrain<IManageProduct>(0, suffix);
var dev = GrainFactory.GetGrain<IDevelopCode>(0, suffix);
var devLead = GrainFactory.GetGrain<ILeadDevelopment>(0, suffix);
foreach (var file in files)
{
@ -33,10 +31,7 @@ public class Ingester : SemanticPersona, IIngestRepo
codeAnalysis.ToList().ForEach(async c =>
await _kernel.Memory.SaveInformationAsync(MemorySegment, c.CodeBlock, Guid.NewGuid().ToString(), c.Meaning));
Task.WaitAll(new[] {
pm.BuildUnderstanding(file.Content),
dev.BuildUnderstanding(file.Content),
devLead.BuildUnderstanding(file.Content)});
await dev.BuildUnderstanding(file.Content);
}
}
}

View File

@ -9,7 +9,7 @@ public class ProductManager : SemanticPersona, IManageProduct
private readonly IKernel _kernel;
protected override string MemorySegment => "pm-memory";
public ProductManager(IKernel kernel,[PersistentState("state", "messages")] IPersistentState<ChatHistory> state) : base(state)
public ProductManager(IKernel kernel,[PersistentState("state", "messages")] IPersistentState<SemanticPersonaState> state) : base(state)
{
_kernel = kernel;
}
@ -39,4 +39,9 @@ public class ProductManager : SemanticPersona, IManageProduct
await _state.WriteStateAsync();
return resultMessage;
}
public Task<string> BuildUnderstanding(string content)
{
throw new NotImplementedException();
}
}

View File

@ -10,7 +10,7 @@
<PackageReference Include="Microsoft.Orleans.Sdk" Version="7.2.1" />
<PackageReference Include="Microsoft.Orleans.Runtime" Version="7.2.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.SemanticKernel" Version="0.24.230918.1-preview" />
<PackageReference Include="Microsoft.SemanticKernel" Version="1.0.0-beta5" />
<PackageReference Include="Octokit" Version="7.1.0" />
<PackageReference Include="GitHubJwt" Version="0.0.6" />
<PackageReference Include="Azure.ResourceManager.ContainerInstance" Version="1.2.0-beta.1" />