temp 2
This commit is contained in:
@@ -75,7 +75,7 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
|
||||
// ======================[ Conversations ]======================
|
||||
public IEnumerable<AiConversationDC> GetAiConversations(int uicontext, long? oid)
|
||||
public IEnumerable<AiConversationDC> GetAiConversations(AiContextType uicontext, long? oid)
|
||||
{
|
||||
// SearchDAO
|
||||
var current_user = UserRightHelper.GetLoggedInUserWithOid();
|
||||
@@ -95,7 +95,7 @@ namespace BeWo.Service.Plugins
|
||||
var main_ref_obj = conv.ContextBeWoObjects?.FirstOrDefault();
|
||||
|
||||
// ServiceRecord
|
||||
if (uicontext == 19)
|
||||
if (uicontext == AiContextType.ServiceRecord)
|
||||
main_ref_obj = conv.ContextBeWoObjects.FirstOrDefault(x => x.Tid == TableID.SupportConcept);
|
||||
|
||||
if (main_ref_obj?.Oid != ref_oid)
|
||||
@@ -271,7 +271,7 @@ namespace BeWo.Service.Plugins
|
||||
return models;
|
||||
}
|
||||
|
||||
private AiConversation createAiConversation(int uicontext, Dictionary<TableID, long[]> context, long modell_oid, AiDataContextType context_Type)
|
||||
private AiConversation createAiConversation(AiContextType uicontext, Dictionary<TableID, long[]> context, long modell_oid, AiDataContextType context_Type)
|
||||
{
|
||||
var current_user = UserRightHelper.GetLoggedInUserWithOid();
|
||||
var factory = getFactory(context_Type);
|
||||
@@ -302,7 +302,7 @@ namespace BeWo.Service.Plugins
|
||||
return conv;
|
||||
}
|
||||
|
||||
private BaseAiPromptFactory getFactory(AiDataContextType context_Type)
|
||||
private JsonAiPromptFactory getFactory(AiDataContextType context_Type)
|
||||
{
|
||||
if (context_Type == AiDataContextType.json)
|
||||
return new JsonAiPromptFactory();
|
||||
|
||||
Reference in New Issue
Block a user