microsoft / microsoft/agent-framework

.NET: Investigate adding abstractions to retrieve generated code

Open
#794 1 comment 0 reactions 0 assignees View on GitHub
.NET
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

At the moment we need to break glass to extract the code generated by the code interpreter tool. The purpose of this task is to investigate to see can abstractions be introduced to handle this.

```csharp
// Extract the code generated by code interpreter tool
var chatResponse = response.RawRepresentation as ChatResponse;
StringBuilder generatedCode = new();
foreach (object? updateRawRepresentation in chatResponse?.RawRepresentation as IEnumerable ?? [])
{
if (updateRawRepresentation is RunStepDetailsUpdate update && update.CodeInterpreterInput is not null)
{
generatedCode.Append(update.CodeInterpreterInput);
}
}
Console.WriteLine($"\nGenerated Code:\n{generatedCode}");
```

Contributor guide

Open the contributing guide

Research direction

Start with the C# extraction example and inspect ChatResponse, RunStepDetailsUpdate, and CodeInterpreterInput to understand how generated code is currently exposed. The investigation is complete when a suitable abstraction for retrieving generated code is defined and its scope is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
ai, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.