Skip to content

Commit 4404e21

Browse files
authored
Merge pull request #1176 from iceljc/features/refine-py-interpreter
Features/refine py interpreter
2 parents 479087c + 6a0153d commit 4404e21

File tree

88 files changed

+1485
-435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1485
-435
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<PackageVersion Include="Sdcb.PaddleOCR" Version="2.7.0.1" />
7474
<PackageVersion Include="Sdcb.PaddleOCR.Models.LocalV3" Version="2.7.0.1" />
7575
<PackageVersion Include="System.Drawing.Common" Version="8.0.14" />
76-
<PackageVersion Include="pythonnet" Version="3.0.4" />
76+
<PackageVersion Include="pythonnet" Version="3.0.5" />
7777
<PackageVersion Include="Qdrant.Client" Version="1.15.0" />
7878
<PackageVersion Include="Selenium.WebDriver" Version="4.27.0" />
7979
<PackageVersion Include="HtmlAgilityPack" Version="1.12.0" />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace BotSharp.Abstraction.Agents.Enums;
2+
3+
public static class AgentCodeScriptType
4+
{
5+
public const string Src = "src";
6+
public const string Test = "test";
7+
}

src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentFuncVisMode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace BotSharp.Abstraction.Agents.Enums;
22

3-
public class AgentFuncVisMode
3+
public static class AgentFuncVisMode
44
{
55
public const string Manual = "manual";
66
public const string Auto = "auto";

src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentRole.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace BotSharp.Abstraction.Agents.Enums;
22

3-
public class AgentRole
3+
public static class AgentRole
44
{
55
public const string System = "system";
66
public const string Assistant = "assistant";

src/Infrastructure/BotSharp.Abstraction/Agents/Enums/AgentType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace BotSharp.Abstraction.Agents.Enums;
22

3-
public class AgentType
3+
public static class AgentType
44
{
55
/// <summary>
66
/// Routing agent

src/Infrastructure/BotSharp.Abstraction/Agents/Enums/BuiltInAgentId.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace BotSharp.Abstraction.Agents.Enums;
22

3-
public class BuiltInAgentId
3+
public static class BuiltInAgentId
44
{
55
/// <summary>
66
/// A routing agent can be used as a base router.

src/Infrastructure/BotSharp.Abstraction/Agents/IAgentService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public interface IAgentService
5959
/// <param name="agent"></param>
6060
/// <returns></returns>
6161
Task<string> PatchAgentTemplate(Agent agent);
62-
Task<string> UpdateAgentFromFile(string id);
6362
string GetDataDir();
6463
string GetAgentDataDir(string agentId);
6564

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
namespace BotSharp.Abstraction.Agents.Models;
2+
3+
public class AgentCodeScript : AgentCodeScriptBase
4+
{
5+
public string Id { get; set; }
6+
public string AgentId { get; set; } = null!;
7+
8+
public AgentCodeScript() : base()
9+
{
10+
}
11+
12+
public override string ToString()
13+
{
14+
return $"{CodePath}";
15+
}
16+
}
17+
18+
public class AgentCodeScriptBase
19+
{
20+
public string Name { get; set; } = null!;
21+
public string Content { get; set; } = null!;
22+
23+
/// <summary>
24+
/// Code script type: src, test
25+
/// </summary>
26+
public string ScriptType { get; set; } = null!;
27+
28+
public string CodePath => $"{ScriptType}/{Name}";
29+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
using BotSharp.Abstraction.CodeInterpreter.Models;
2+
3+
namespace BotSharp.Abstraction.CodeInterpreter;
4+
5+
public interface ICodeInterpretService
6+
{
7+
string Provider { get; }
8+
9+
Task<CodeInterpretResult> RunCode(string codeScript, CodeInterpretOptions? options = null)
10+
=> throw new NotImplementedException();
11+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace BotSharp.Abstraction.CodeInterpreter.Models;
2+
3+
public class CodeInterpretOptions
4+
{
5+
public IEnumerable<KeyValue>? Arguments { get; set; }
6+
}

0 commit comments

Comments
 (0)