-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #305 from SciSharp/mergecode
merge code
- Loading branch information
Showing
77 changed files
with
1,148 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationSenderActionModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using BotSharp.Abstraction.Messaging.Enums; | ||
|
||
namespace BotSharp.Abstraction.Conversations.Models; | ||
|
||
public class ConversationSenderActionModel | ||
{ | ||
[JsonPropertyName("conversation_id")] | ||
public string ConversationId { get; set; } | ||
[JsonPropertyName("sender_action")] | ||
public SenderActionEnum SenderAction { get; set; } | ||
} |
11 changes: 0 additions & 11 deletions
11
src/Infrastructure/BotSharp.Abstraction/Conversations/Models/ConversationStateLogModel.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
...ction/Loggers/Models/StreamingLogModel.cs → ...ers/Models/ConversationContentLogModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
namespace BotSharp.Abstraction.Loggers.Models; | ||
|
||
public class StreamingLogModel | ||
public class ConversationContentLogModel | ||
{ | ||
[JsonPropertyName("conversation_id")] | ||
public string ConversationId { get; set; } | ||
[JsonPropertyName("message_id")] | ||
public string MessageId { get; set; } | ||
[JsonPropertyName("name")] | ||
public string? Name { get; set; } | ||
[JsonPropertyName("role")] | ||
public string Role { get; set; } | ||
|
||
[JsonPropertyName("content")] | ||
public string Content { get; set; } | ||
|
||
[JsonPropertyName("created_at")] | ||
public DateTime CreateTime { get; set; } | ||
public DateTime CreateTime { get; set; } = DateTime.UtcNow; | ||
} |
13 changes: 13 additions & 0 deletions
13
src/Infrastructure/BotSharp.Abstraction/Loggers/Models/ConversationStateLogModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace BotSharp.Abstraction.Loggers.Models; | ||
|
||
public class ConversationStateLogModel | ||
{ | ||
[JsonPropertyName("conversation_id")] | ||
public string ConversationId { get; set; } | ||
[JsonPropertyName("message_id")] | ||
public string MessageId { get; set; } | ||
[JsonPropertyName("states")] | ||
public Dictionary<string, string> States { get; set; } | ||
[JsonPropertyName("created_at")] | ||
public DateTime CreateTime { get; set; } = DateTime.UtcNow; | ||
} |
2 changes: 1 addition & 1 deletion
2
.../Conversations/Models/LlmCompletionLog.cs → ...action/Loggers/Models/LlmCompletionLog.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
...enger/MessagingModels/SenderActionEnum.cs → ...ction/Messaging/Enums/SenderActionEnum.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.Log.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using BotSharp.Abstraction.Loggers.Models; | ||
using BotSharp.Abstraction.Repositories; | ||
|
||
namespace BotSharp.Core.Conversations.Services; | ||
|
||
public partial class ConversationService | ||
{ | ||
public async Task<List<ConversationContentLogModel>> GetConversationContentLogs(string conversationId) | ||
{ | ||
var db = _services.GetRequiredService<IBotSharpRepository>(); | ||
var logs = db.GetConversationContentLogs(conversationId); | ||
return await Task.FromResult(logs); | ||
} | ||
|
||
|
||
public async Task<List<ConversationStateLogModel>> GetConversationStateLogs(string conversationId) | ||
{ | ||
var db = _services.GetRequiredService<IBotSharpRepository>(); | ||
var logs = db.GetConversationStateLogs(conversationId); | ||
return await Task.FromResult(logs); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.