Skip to content

Commit

Permalink
replace public flag with system flag in conversation handling
Browse files Browse the repository at this point in the history
  • Loading branch information
arturoliduena committed Feb 3, 2025
1 parent f5ac6ef commit aa68ff0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function createNewConversation({
},
labels: {},
numeric_labels: {},
public: false,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export interface Conversation {
labels: Record<string, string>;
numeric_labels: Record<string, number>;
namespace: string;
public: boolean;
system?: boolean;
}

export type ConversationRequestBase = Omit<Conversation, 'user' | 'conversation' | 'namespace'> & {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export class ObservabilityAIAssistantClient {
signal,
persist,
kibanaPublicUrl,
isPublic,
isSystem = false,
title: predefinedTitle,
conversationId: predefinedConversationId,
disableFunctions = false,
Expand All @@ -184,7 +184,7 @@ export class ObservabilityAIAssistantClient {
persist: boolean;
conversationId?: string;
title?: string;
isPublic?: boolean;
isSystem?: boolean;
kibanaPublicUrl?: string;
instructions?: AdHocInstruction[];
simulateFunctionCalling?: boolean;
Expand Down Expand Up @@ -409,7 +409,7 @@ export class ObservabilityAIAssistantClient {
id: conversationId,
token_count: tokenCountResult,
},
public: !!isPublic,
system: !!isSystem,
labels: {},
numeric_labels: {},
messages: initialMessagesWithAddedMessages,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe('observabilityAIAssistant rule_connector', () => {
expect(completeMock).toHaveBeenCalledWith(
expect.objectContaining({
persist: true,
isPublic: true,
isSystem: true,
connectorId: 'azure-open-ai',
kibanaPublicUrl: 'http://kibana.com',
messages: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ If available, include the link of the conversation at the end of your answer.`
.complete({
functionClient,
persist: true,
isPublic: true,
isSystem: true,
connectorId: execOptions.params.connector,
signal: new AbortController().signal,
kibanaPublicUrl: (await resources.plugins.core.start()).http.basePath.publicBaseUrl,
Expand Down

0 comments on commit aa68ff0

Please sign in to comment.