Skip to content

Commit 994da49

Browse files
authored
Merge branch 'SciSharp:master' into master
2 parents 213d393 + 385b65e commit 994da49

File tree

118 files changed

+1257
-552
lines changed

Some content is hidden

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

118 files changed

+1257
-552
lines changed

Directory.Packages.props

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
33
<MSExtensionsVersion>8.0.0</MSExtensionsVersion>
4-
<AspNetCoreVersion>2.3.0</AspNetCoreVersion>
4+
<AspNetCoreVersion>2.3.0</AspNetCoreVersion>
55
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
66
</PropertyGroup>
77
<ItemGroup>
@@ -13,7 +13,7 @@
1313
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
1414
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.1" />
1515
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.3" />
16-
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
16+
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
1717
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
1818
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
1919
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="8.0.0" />
@@ -51,7 +51,7 @@
5151
<PackageVersion Include="PdfPig" Version="0.1.8" />
5252
<PackageVersion Include="TensorFlow.Keras" Version="0.15.0" />
5353
<PackageVersion Include="LangChain.Providers.Google.VertexAI" Version="0.15.3-dev.58" />
54-
<PackageVersion Include="LLamaSharp" Version="0.20.0" />
54+
<PackageVersion Include="LLamaSharp" Version="0.21.0" />
5555
<PackageVersion Include="FaissMask" Version="0.2.0" />
5656
<PackageVersion Include="FastText.NetWrapper" Version="1.3.0" />
5757
<PackageVersion Include="Microsoft.Extensions.AI.Abstractions" Version="9.3.0-preview.1.25161.3" />
@@ -108,7 +108,9 @@
108108
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
109109
</ItemGroup>
110110
<ItemGroup>
111+
<PackageVersion Include="BotSharp.Core" Version="$(BotSharpVersion)" />
111112
<PackageVersion Include="BotSharp.Logger" Version="$(BotSharpVersion)" />
113+
<PackageVersion Include="BotSharp.Core.Realtime" Version="$(BotSharpVersion)" />
112114
<PackageVersion Include="BotSharp.OpenAPI" Version="$(BotSharpVersion)" />
113115
<PackageVersion Include="BotSharp.Plugin.Dashboard" Version="$(BotSharpVersion)" />
114116
<PackageVersion Include="BotSharp.Plugin.AzureOpenAI" Version="$(BotSharpVersion)" />
@@ -127,7 +129,6 @@
127129
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.5" />
128130
<PackageVersion Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="8.0.5" />
129131
</ItemGroup>
130-
131132
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
132133
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Google" Version="6.0.27" />
133134
<PackageVersion Include="AspNet.Security.OAuth.GitHub" Version="6.0.15" />

src/Infrastructure/BotSharp.Abstraction/Browsing/Models/PageActionArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class PageActionArgs
2020
public bool OpenNewTab { get; set; } = true;
2121
[JsonPropertyName("open_blank_page")]
2222
public bool OpenBlankPage { get; set; } = true;
23-
23+
[JsonPropertyName("enable_response_callback")]
2424
public bool EnableResponseCallback { get; set; } = false;
2525

2626
/// <summary>

src/Infrastructure/BotSharp.Abstraction/Browsing/Models/WebPageResponseData.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,20 @@ public class WebPageResponseData
77
public string ResponseData { get; set; } = null!;
88
public bool ResponseInMemory { get; set; }
99
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
10+
public string Method { get; set; }
11+
public List<WebPageCookieData> Cookies { get; set; }
12+
public int ResponseCode { get; set; }
1013

1114
public override string ToString()
1215
{
1316
return $"{Url} {ResponseData.Length}";
1417
}
1518
}
19+
public class WebPageCookieData
20+
{
21+
public string Name { get; set; } = null!;
22+
public string Value { get; set; } = null!;
23+
public string Domain { get; set; } = null!;
24+
public string Path { get; set; } = null!;
25+
public float Expires { get; set; }
26+
}

src/Infrastructure/BotSharp.Abstraction/Browsing/Settings/WebBrowsingSettings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public class WebBrowsingSettings
66
public bool Headless { get; set; }
77
// Default timeout in milliseconds
88
public float DefaultTimeout { get; set; } = 30000;
9+
public float DefaultNavigationTimeout { get; set; } = 30000;
910
public bool IsEnableScreenshot { get; set; }
1011
// Default wait time in seconds after page is opened
1112
public int DefaultWaitTime { get; set; } = 5;

src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public interface IConversationService
99
string ConversationId { get; }
1010
Task<Conversation> NewConversation(Conversation conversation);
1111
void SetConversationId(string conversationId, List<MessageState> states, bool isReadOnly = false);
12-
Task<Conversation> GetConversation(string id);
12+
Task<Conversation> GetConversation(string id, bool isLoadStates = false);
1313
Task<PagedItems<Conversation>> GetConversations(ConversationFilter filter);
1414
Task<Conversation> UpdateConversationTitle(string id, string title);
1515
Task<Conversation> UpdateConversationTitleAlias(string id, string titleAlias);

src/Infrastructure/BotSharp.Abstraction/Conversations/Models/TokenStatsModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ public class TokenStatsModel
66
public string Model { get; set; }
77
public string Prompt { get; set; }
88
public int PromptCount { get; set; }
9+
public int CachedPromptCount { get; set; }
910
public int CompletionCount { get; set; }
1011
public AgentLlmConfig LlmConfig { get; set; }
1112
}

src/Infrastructure/BotSharp.Abstraction/Functions/Models/FunctionDef.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ public class FunctionDef
2525
[JsonPropertyName("parameters")]
2626
public FunctionParametersDef Parameters { get; set; } = new FunctionParametersDef();
2727

28+
[JsonPropertyName("output")]
29+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
30+
public string? Output { get; set; }
31+
2832
public override string ToString()
2933
{
3034
return $"{Name}: {Description}";

src/Infrastructure/BotSharp.Abstraction/Infrastructures/Enums/StateConst.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ public class StateConst
1616

1717
public const string SUB_CONVERSATION_ID = "sub_conversation_id";
1818
public const string ORIGIN_CONVERSATION_ID = "origin_conversation_id";
19+
public const string WEB_DRIVER_TASK_ID = "web_driver_task_id";
1920
}

src/Infrastructure/BotSharp.Abstraction/Instructs/InstructHookBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ public class InstructHookBase : IInstructHook
88

99
public virtual async Task BeforeCompletion(Agent agent, RoleDialogModel message)
1010
{
11-
return;
11+
await Task.CompletedTask;
1212
}
1313

1414
public virtual async Task AfterCompletion(Agent agent, InstructResult result)
1515
{
16-
return;
16+
await Task.CompletedTask;
1717
}
1818

1919
public virtual async Task OnResponseGenerated(InstructResponseModel response)
2020
{
21-
return;
21+
await Task.CompletedTask;
2222
}
2323
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace BotSharp.Abstraction.Instructs.Models;
2+
3+
public class ExecuteTemplateArgs
4+
{
5+
[JsonPropertyName("template_name")]
6+
public string? TemplateName { get; set; }
7+
}

0 commit comments

Comments
 (0)