last ...
This commit is contained in:
@@ -1070,20 +1070,19 @@ namespace xAiModels.Providers
|
||||
}
|
||||
|
||||
//
|
||||
// Detect Conversation Resource ...
|
||||
// Check Default Owner Exists or not ...
|
||||
var resource = await stringProvider.FindOne(
|
||||
cancellationToken: cancellationToken,
|
||||
predicate: x =>
|
||||
x.ResourceTitle
|
||||
.ToNormalString()
|
||||
.Contains(ownerId.ToNormalString()) &&
|
||||
.Contains(ownerId.ToString().ToNormalString()) &&
|
||||
x.ResourceTitle
|
||||
.ToNormalString()
|
||||
.Contains(XAiModelsConstants.XAiProjectTitleIdentifier
|
||||
.ToNormalString()) &&
|
||||
.Contains(XAiModelsConstants.XAiConversationTitleIdentifier.ToNormalString()) &&
|
||||
x.TranslatedValue
|
||||
.ToNormalString()
|
||||
.Contains(XAiDataProviderConstants.XDefaultAiProjectSuffix)
|
||||
.Contains(XAiDataProviderConstants.XDefaultAiConversationSuffix.ToNormalString())
|
||||
);
|
||||
if (resource.IsNullOrDefault())
|
||||
{
|
||||
@@ -1091,20 +1090,12 @@ namespace xAiModels.Providers
|
||||
}
|
||||
|
||||
//
|
||||
// Find Default Conversation ...
|
||||
var result = await conversationRepositoryService.FindOneAsync(
|
||||
cancellationToken: cancellationToken,
|
||||
predicate: x => x.Title
|
||||
.Equals(
|
||||
resource.ResourceTitle,
|
||||
StringComparison.InvariantCultureIgnoreCase
|
||||
) &&
|
||||
x.ProjectId == project.Id
|
||||
predicate: x =>
|
||||
x.ProjectId == projectId &&
|
||||
x.Title == resource.ResourceTitle
|
||||
);
|
||||
if (result.IsNullOrDefault())
|
||||
{
|
||||
XException.NotFound.Throw();
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user