graphlit-client 1.0.20250620002 → 1.0.20250622001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts
CHANGED
@@ -174,11 +174,11 @@ declare class Graphlit {
|
|
174
174
|
reviseContent(prompt: string, content: Types.EntityReferenceInput, id?: string, specification?: Types.EntityReferenceInput, correlationId?: string): Promise<Types.ReviseContentMutation>;
|
175
175
|
prompt(prompt?: string, mimeType?: string, data?: string, specification?: Types.EntityReferenceInput, messages?: Types.ConversationMessageInput[], correlationId?: string): Promise<Types.PromptMutation>;
|
176
176
|
retrieveSources(prompt: string, filter?: Types.ContentFilter, augmentedFilter?: Types.ContentFilter, retrievalStrategy?: Types.RetrievalStrategyInput, rerankingStrategy?: Types.RerankingStrategyInput, correlationId?: string): Promise<Types.RetrieveSourcesMutation>;
|
177
|
-
formatConversation(prompt: string, id?: string, specification?: Types.EntityReferenceInput, tools?: Types.ToolDefinitionInput[], includeDetails?: boolean, correlationId?: string): Promise<Types.FormatConversationMutation>;
|
178
|
-
completeConversation(completion: string, id: string, correlationId?: string): Promise<Types.CompleteConversationMutation>;
|
177
|
+
formatConversation(prompt: string, id?: string, specification?: Types.EntityReferenceInput, tools?: Types.ToolDefinitionInput[], systemPrompt?: string, includeDetails?: boolean, correlationId?: string): Promise<Types.FormatConversationMutation>;
|
178
|
+
completeConversation(completion: string, id: string, completionTime?: Types.Scalars["TimeSpan"]["input"], ttft?: Types.Scalars["TimeSpan"]["input"], throughput?: Types.Scalars["Float"]["input"], correlationId?: string): Promise<Types.CompleteConversationMutation>;
|
179
179
|
askGraphlit(prompt: string, type?: Types.SdkTypes, id?: string, specification?: Types.EntityReferenceInput, correlationId?: string): Promise<Types.AskGraphlitMutation>;
|
180
180
|
branchConversation(id: string): Promise<Types.BranchConversationMutation>;
|
181
|
-
promptConversation(prompt: string, id?: string, specification?: Types.EntityReferenceInput, mimeType?: string, data?: string, tools?: Types.ToolDefinitionInput[], requireTool?: boolean, includeDetails?: boolean, correlationId?: string): Promise<Types.PromptConversationMutation>;
|
181
|
+
promptConversation(prompt: string, id?: string, specification?: Types.EntityReferenceInput, mimeType?: string, data?: string, tools?: Types.ToolDefinitionInput[], requireTool?: boolean, systemPrompt?: string, includeDetails?: boolean, correlationId?: string): Promise<Types.PromptConversationMutation>;
|
182
182
|
continueConversation(id: string, responses: Types.ConversationToolResponseInput[], correlationId?: string): Promise<Types.ContinueConversationMutation>;
|
183
183
|
publishConversation(id: string, connector: Types.ContentPublishingConnectorInput, name?: string, workflow?: Types.EntityReferenceInput, isSynchronous?: boolean, correlationId?: string): Promise<Types.PublishConversationMutation>;
|
184
184
|
suggestConversation(id: string, count?: number, correlationId?: string): Promise<Types.SuggestConversationMutation>;
|
package/dist/client.js
CHANGED
@@ -791,20 +791,24 @@ class Graphlit {
|
|
791
791
|
correlationId: correlationId,
|
792
792
|
});
|
793
793
|
}
|
794
|
-
async formatConversation(prompt, id, specification, tools, includeDetails, correlationId) {
|
794
|
+
async formatConversation(prompt, id, specification, tools, systemPrompt, includeDetails, correlationId) {
|
795
795
|
return this.mutateAndCheckError(Documents.FormatConversation, {
|
796
796
|
prompt: prompt,
|
797
797
|
id: id,
|
798
798
|
specification: specification,
|
799
799
|
tools: tools,
|
800
|
+
systemPrompt: systemPrompt,
|
800
801
|
includeDetails: includeDetails,
|
801
802
|
correlationId: correlationId,
|
802
803
|
});
|
803
804
|
}
|
804
|
-
async completeConversation(completion, id, correlationId) {
|
805
|
+
async completeConversation(completion, id, completionTime, ttft, throughput, correlationId) {
|
805
806
|
return this.mutateAndCheckError(Documents.CompleteConversation, {
|
806
807
|
completion: completion,
|
807
808
|
id: id,
|
809
|
+
completionTime: completionTime,
|
810
|
+
ttft: ttft,
|
811
|
+
throughput: throughput,
|
808
812
|
correlationId: correlationId,
|
809
813
|
});
|
810
814
|
}
|
@@ -822,7 +826,7 @@ class Graphlit {
|
|
822
826
|
id: id,
|
823
827
|
});
|
824
828
|
}
|
825
|
-
async promptConversation(prompt, id, specification, mimeType, data, tools, requireTool, includeDetails, correlationId) {
|
829
|
+
async promptConversation(prompt, id, specification, mimeType, data, tools, requireTool, systemPrompt, includeDetails, correlationId) {
|
826
830
|
return this.mutateAndCheckError(Documents.PromptConversation, {
|
827
831
|
prompt: prompt,
|
828
832
|
id: id,
|
@@ -831,6 +835,7 @@ class Graphlit {
|
|
831
835
|
data: data,
|
832
836
|
tools: tools,
|
833
837
|
requireTool: requireTool,
|
838
|
+
systemPrompt: systemPrompt,
|
834
839
|
includeDetails: includeDetails,
|
835
840
|
correlationId: correlationId,
|
836
841
|
});
|
@@ -1702,7 +1707,7 @@ class Graphlit {
|
|
1702
1707
|
}
|
1703
1708
|
// 2. Initial prompt
|
1704
1709
|
const promptResponse = await this.promptConversation(prompt, actualConversationId, specification, mimeType, data, tools, false, // requireTool
|
1705
|
-
true, // includeDetails - needed for context window tracking
|
1710
|
+
undefined, true, // includeDetails - needed for context window tracking
|
1706
1711
|
correlationId);
|
1707
1712
|
let currentMessage = promptResponse.promptConversation?.message;
|
1708
1713
|
if (!currentMessage) {
|
@@ -1961,7 +1966,7 @@ class Graphlit {
|
|
1961
1966
|
conversationId,
|
1962
1967
|
});
|
1963
1968
|
// Format conversation once at the beginning
|
1964
|
-
const formatResponse = await this.formatConversation(prompt, conversationId, { id: specification.id }, tools, true, correlationId);
|
1969
|
+
const formatResponse = await this.formatConversation(prompt, conversationId, { id: specification.id }, tools, undefined, true, correlationId);
|
1965
1970
|
const formattedMessage = formatResponse.formatConversation?.message;
|
1966
1971
|
const conversationHistory = formatResponse.formatConversation?.details?.messages;
|
1967
1972
|
if (!formattedMessage?.message) {
|
@@ -2399,7 +2404,11 @@ class Graphlit {
|
|
2399
2404
|
let finalTokens;
|
2400
2405
|
const trimmedMessage = fullMessage?.trim();
|
2401
2406
|
if (trimmedMessage) {
|
2402
|
-
|
2407
|
+
// Calculate metrics for completeConversation
|
2408
|
+
const completionTime = uiAdapter.getCompletionTime(); // Total time in milliseconds
|
2409
|
+
const ttft = uiAdapter.getTTFT(); // Time to first token in milliseconds
|
2410
|
+
const throughput = uiAdapter.getThroughput(); // Tokens per second
|
2411
|
+
const completeResponse = await this.completeConversation(trimmedMessage, conversationId, completionTime, ttft, throughput, correlationId);
|
2403
2412
|
// Extract token count from the response
|
2404
2413
|
finalTokens =
|
2405
2414
|
completeResponse.completeConversation?.message?.tokens ?? undefined;
|
@@ -2532,7 +2541,7 @@ class Graphlit {
|
|
2532
2541
|
if (process.env.DEBUG_GRAPHLIT_SDK_STREAMING) {
|
2533
2542
|
console.log(`🔄 [Fallback] Starting non-streaming fallback | ConvID: ${conversationId} | Spec: ${specification.name} (${specification.serviceType}) | Prompt: "${prompt.substring(0, 50)}${prompt.length > 50 ? "..." : ""}"`);
|
2534
2543
|
}
|
2535
|
-
const response = await this.promptConversation(prompt, conversationId, { id: specification.id }, mimeType, data, tools, false, false, correlationId);
|
2544
|
+
const response = await this.promptConversation(prompt, conversationId, { id: specification.id }, mimeType, data, tools, false, undefined, false, correlationId);
|
2536
2545
|
const message = response.promptConversation?.message;
|
2537
2546
|
if (process.env.DEBUG_GRAPHLIT_SDK_STREAMING) {
|
2538
2547
|
console.log(`✅ [Fallback] promptConversation completed | Length: ${message?.message?.length || 0} chars | Preview: "${message?.message?.substring(0, 50) || "NO MESSAGE"}${(message?.message?.length || 0) > 50 ? "..." : ""}"`);
|
@@ -502,7 +502,6 @@ export const GetCollection = gql `
|
|
502
502
|
id
|
503
503
|
name
|
504
504
|
creationDate
|
505
|
-
relevance
|
506
505
|
owner {
|
507
506
|
id
|
508
507
|
}
|
@@ -528,10 +527,6 @@ export const QueryCollections = gql `
|
|
528
527
|
}
|
529
528
|
state
|
530
529
|
type
|
531
|
-
contents {
|
532
|
-
id
|
533
|
-
name
|
534
|
-
}
|
535
530
|
}
|
536
531
|
}
|
537
532
|
}
|
@@ -720,6 +715,7 @@ export const DescribeEncodedImage = gql `
|
|
720
715
|
}
|
721
716
|
tokens
|
722
717
|
throughput
|
718
|
+
ttft
|
723
719
|
completionTime
|
724
720
|
timestamp
|
725
721
|
modelService
|
@@ -855,6 +851,7 @@ export const DescribeImage = gql `
|
|
855
851
|
}
|
856
852
|
tokens
|
857
853
|
throughput
|
854
|
+
ttft
|
858
855
|
completionTime
|
859
856
|
timestamp
|
860
857
|
modelService
|
@@ -2302,42 +2299,10 @@ export const QueryContents = gql `
|
|
2302
2299
|
id
|
2303
2300
|
name
|
2304
2301
|
}
|
2305
|
-
collections {
|
2306
|
-
id
|
2307
|
-
name
|
2308
|
-
}
|
2309
2302
|
links {
|
2310
2303
|
uri
|
2311
2304
|
linkType
|
2312
2305
|
}
|
2313
|
-
observations {
|
2314
|
-
id
|
2315
|
-
type
|
2316
|
-
observable {
|
2317
|
-
id
|
2318
|
-
name
|
2319
|
-
}
|
2320
|
-
related {
|
2321
|
-
id
|
2322
|
-
name
|
2323
|
-
}
|
2324
|
-
relatedType
|
2325
|
-
relation
|
2326
|
-
occurrences {
|
2327
|
-
type
|
2328
|
-
confidence
|
2329
|
-
startTime
|
2330
|
-
endTime
|
2331
|
-
pageIndex
|
2332
|
-
boundingBox {
|
2333
|
-
left
|
2334
|
-
top
|
2335
|
-
width
|
2336
|
-
height
|
2337
|
-
}
|
2338
|
-
}
|
2339
|
-
state
|
2340
|
-
}
|
2341
2306
|
workflow {
|
2342
2307
|
id
|
2343
2308
|
name
|
@@ -2699,6 +2664,7 @@ export const AskGraphlit = gql `
|
|
2699
2664
|
}
|
2700
2665
|
tokens
|
2701
2666
|
throughput
|
2667
|
+
ttft
|
2702
2668
|
completionTime
|
2703
2669
|
timestamp
|
2704
2670
|
modelService
|
@@ -2743,10 +2709,13 @@ export const CloseConversation = gql `
|
|
2743
2709
|
}
|
2744
2710
|
`;
|
2745
2711
|
export const CompleteConversation = gql `
|
2746
|
-
mutation CompleteConversation($completion: String!, $id: ID!, $correlationId: String) {
|
2712
|
+
mutation CompleteConversation($completion: String!, $id: ID!, $completionTime: TimeSpan, $ttft: TimeSpan, $throughput: Float, $correlationId: String) {
|
2747
2713
|
completeConversation(
|
2748
2714
|
completion: $completion
|
2749
2715
|
id: $id
|
2716
|
+
completionTime: $completionTime
|
2717
|
+
ttft: $ttft
|
2718
|
+
throughput: $throughput
|
2750
2719
|
correlationId: $correlationId
|
2751
2720
|
) {
|
2752
2721
|
conversation {
|
@@ -2869,6 +2838,7 @@ export const CompleteConversation = gql `
|
|
2869
2838
|
}
|
2870
2839
|
tokens
|
2871
2840
|
throughput
|
2841
|
+
ttft
|
2872
2842
|
completionTime
|
2873
2843
|
timestamp
|
2874
2844
|
modelService
|
@@ -3047,6 +3017,7 @@ export const CompleteConversation = gql `
|
|
3047
3017
|
}
|
3048
3018
|
tokens
|
3049
3019
|
throughput
|
3020
|
+
ttft
|
3050
3021
|
completionTime
|
3051
3022
|
timestamp
|
3052
3023
|
modelService
|
@@ -3187,6 +3158,7 @@ export const ContinueConversation = gql `
|
|
3187
3158
|
}
|
3188
3159
|
tokens
|
3189
3160
|
throughput
|
3161
|
+
ttft
|
3190
3162
|
completionTime
|
3191
3163
|
timestamp
|
3192
3164
|
modelService
|
@@ -3365,6 +3337,7 @@ export const ContinueConversation = gql `
|
|
3365
3337
|
}
|
3366
3338
|
tokens
|
3367
3339
|
throughput
|
3340
|
+
ttft
|
3368
3341
|
completionTime
|
3369
3342
|
timestamp
|
3370
3343
|
modelService
|
@@ -3424,12 +3397,13 @@ export const DeleteConversations = gql `
|
|
3424
3397
|
}
|
3425
3398
|
`;
|
3426
3399
|
export const FormatConversation = gql `
|
3427
|
-
mutation FormatConversation($prompt: String!, $id: ID, $specification: EntityReferenceInput, $tools: [ToolDefinitionInput!], $includeDetails: Boolean, $correlationId: String) {
|
3400
|
+
mutation FormatConversation($prompt: String!, $id: ID, $specification: EntityReferenceInput, $tools: [ToolDefinitionInput!], $systemPrompt: String, $includeDetails: Boolean, $correlationId: String) {
|
3428
3401
|
formatConversation(
|
3429
3402
|
prompt: $prompt
|
3430
3403
|
id: $id
|
3431
3404
|
specification: $specification
|
3432
3405
|
tools: $tools
|
3406
|
+
systemPrompt: $systemPrompt
|
3433
3407
|
includeDetails: $includeDetails
|
3434
3408
|
correlationId: $correlationId
|
3435
3409
|
) {
|
@@ -3553,6 +3527,7 @@ export const FormatConversation = gql `
|
|
3553
3527
|
}
|
3554
3528
|
tokens
|
3555
3529
|
throughput
|
3530
|
+
ttft
|
3556
3531
|
completionTime
|
3557
3532
|
timestamp
|
3558
3533
|
modelService
|
@@ -3731,6 +3706,7 @@ export const FormatConversation = gql `
|
|
3731
3706
|
}
|
3732
3707
|
tokens
|
3733
3708
|
throughput
|
3709
|
+
ttft
|
3734
3710
|
completionTime
|
3735
3711
|
timestamp
|
3736
3712
|
modelService
|
@@ -3874,6 +3850,7 @@ export const GetConversation = gql `
|
|
3874
3850
|
}
|
3875
3851
|
tokens
|
3876
3852
|
throughput
|
3853
|
+
ttft
|
3877
3854
|
completionTime
|
3878
3855
|
timestamp
|
3879
3856
|
modelService
|
@@ -4190,6 +4167,7 @@ export const Prompt = gql `
|
|
4190
4167
|
}
|
4191
4168
|
tokens
|
4192
4169
|
throughput
|
4170
|
+
ttft
|
4193
4171
|
completionTime
|
4194
4172
|
timestamp
|
4195
4173
|
modelService
|
@@ -4204,7 +4182,7 @@ export const Prompt = gql `
|
|
4204
4182
|
}
|
4205
4183
|
`;
|
4206
4184
|
export const PromptConversation = gql `
|
4207
|
-
mutation PromptConversation($prompt: String!, $mimeType: String, $data: String, $id: ID, $specification: EntityReferenceInput, $tools: [ToolDefinitionInput!], $requireTool: Boolean, $includeDetails: Boolean, $correlationId: String) {
|
4185
|
+
mutation PromptConversation($prompt: String!, $mimeType: String, $data: String, $id: ID, $specification: EntityReferenceInput, $systemPrompt: String, $tools: [ToolDefinitionInput!], $requireTool: Boolean, $includeDetails: Boolean, $correlationId: String) {
|
4208
4186
|
promptConversation(
|
4209
4187
|
prompt: $prompt
|
4210
4188
|
id: $id
|
@@ -4212,6 +4190,7 @@ export const PromptConversation = gql `
|
|
4212
4190
|
data: $data
|
4213
4191
|
specification: $specification
|
4214
4192
|
tools: $tools
|
4193
|
+
systemPrompt: $systemPrompt
|
4215
4194
|
requireTool: $requireTool
|
4216
4195
|
includeDetails: $includeDetails
|
4217
4196
|
correlationId: $correlationId
|
@@ -4336,6 +4315,7 @@ export const PromptConversation = gql `
|
|
4336
4315
|
}
|
4337
4316
|
tokens
|
4338
4317
|
throughput
|
4318
|
+
ttft
|
4339
4319
|
completionTime
|
4340
4320
|
timestamp
|
4341
4321
|
modelService
|
@@ -4514,6 +4494,7 @@ export const PromptConversation = gql `
|
|
4514
4494
|
}
|
4515
4495
|
tokens
|
4516
4496
|
throughput
|
4497
|
+
ttft
|
4517
4498
|
completionTime
|
4518
4499
|
timestamp
|
4519
4500
|
modelService
|
@@ -4782,6 +4763,7 @@ export const QueryConversations = gql `
|
|
4782
4763
|
}
|
4783
4764
|
tokens
|
4784
4765
|
throughput
|
4766
|
+
ttft
|
4785
4767
|
completionTime
|
4786
4768
|
timestamp
|
4787
4769
|
modelService
|
@@ -5124,6 +5106,7 @@ export const ReviseContent = gql `
|
|
5124
5106
|
}
|
5125
5107
|
tokens
|
5126
5108
|
throughput
|
5109
|
+
ttft
|
5127
5110
|
completionTime
|
5128
5111
|
timestamp
|
5129
5112
|
modelService
|
@@ -5267,6 +5250,7 @@ export const ReviseEncodedImage = gql `
|
|
5267
5250
|
}
|
5268
5251
|
tokens
|
5269
5252
|
throughput
|
5253
|
+
ttft
|
5270
5254
|
completionTime
|
5271
5255
|
timestamp
|
5272
5256
|
modelService
|
@@ -5409,6 +5393,7 @@ export const ReviseImage = gql `
|
|
5409
5393
|
}
|
5410
5394
|
tokens
|
5411
5395
|
throughput
|
5396
|
+
ttft
|
5412
5397
|
completionTime
|
5413
5398
|
timestamp
|
5414
5399
|
modelService
|
@@ -5551,6 +5536,7 @@ export const ReviseText = gql `
|
|
5551
5536
|
}
|
5552
5537
|
tokens
|
5553
5538
|
throughput
|
5539
|
+
ttft
|
5554
5540
|
completionTime
|
5555
5541
|
timestamp
|
5556
5542
|
modelService
|
@@ -6297,14 +6283,20 @@ export const QueryMicrosoftTeamsTeams = gql `
|
|
6297
6283
|
export const QueryNotionDatabases = gql `
|
6298
6284
|
query QueryNotionDatabases($properties: NotionDatabasesInput!) {
|
6299
6285
|
notionDatabases(properties: $properties) {
|
6300
|
-
results
|
6286
|
+
results {
|
6287
|
+
name
|
6288
|
+
identifier
|
6289
|
+
}
|
6301
6290
|
}
|
6302
6291
|
}
|
6303
6292
|
`;
|
6304
6293
|
export const QueryNotionPages = gql `
|
6305
6294
|
query QueryNotionPages($properties: NotionPagesInput!, $identifier: String!) {
|
6306
6295
|
notionPages(properties: $properties, identifier: $identifier) {
|
6307
|
-
results
|
6296
|
+
results {
|
6297
|
+
name
|
6298
|
+
identifier
|
6299
|
+
}
|
6308
6300
|
}
|
6309
6301
|
}
|
6310
6302
|
`;
|
@@ -8587,6 +8579,7 @@ export const PromptSpecifications = gql `
|
|
8587
8579
|
}
|
8588
8580
|
tokens
|
8589
8581
|
throughput
|
8582
|
+
ttft
|
8590
8583
|
completionTime
|
8591
8584
|
timestamp
|
8592
8585
|
modelService
|
@@ -8618,6 +8611,7 @@ export const QueryModels = gql `
|
|
8618
8611
|
useCases
|
8619
8612
|
}
|
8620
8613
|
metadata {
|
8614
|
+
reasoning
|
8621
8615
|
multilingual
|
8622
8616
|
multimodal
|
8623
8617
|
knowledgeCutoff
|
@@ -2402,11 +2402,15 @@ export type ConversationMessage = {
|
|
2402
2402
|
toolCallResponse?: Maybe<Scalars['String']['output']>;
|
2403
2403
|
/** The tools called during the prompting of the conversation. You will need to call continueConversation with the tool responses to continue the conversation. */
|
2404
2404
|
toolCalls?: Maybe<Array<Maybe<ConversationToolCall>>>;
|
2405
|
+
/** The time to first token (TTFT) for the model to complete the prompt, only provided with assistant role. */
|
2406
|
+
ttft?: Maybe<Scalars['TimeSpan']['output']>;
|
2405
2407
|
};
|
2406
2408
|
/** Represents a conversation message. */
|
2407
2409
|
export type ConversationMessageInput = {
|
2408
2410
|
/** The conversation message author. */
|
2409
2411
|
author?: InputMaybe<Scalars['String']['input']>;
|
2412
|
+
/** The elapsed time for the model to complete the prompt. */
|
2413
|
+
completionTime?: InputMaybe<Scalars['TimeSpan']['input']>;
|
2410
2414
|
/** The Base64-encoded image which will be supplied to the LLM with the conversation message, optional. */
|
2411
2415
|
data?: InputMaybe<Scalars['String']['input']>;
|
2412
2416
|
/** The conversation message. */
|
@@ -2415,6 +2419,14 @@ export type ConversationMessageInput = {
|
|
2415
2419
|
mimeType?: InputMaybe<Scalars['String']['input']>;
|
2416
2420
|
/** The conversation message role. */
|
2417
2421
|
role: ConversationRoleTypes;
|
2422
|
+
/** The LLM completion throughput in tokens/second, only provided with assistant role. */
|
2423
|
+
throughput?: InputMaybe<Scalars['Float']['input']>;
|
2424
|
+
/** The conversation message timestamp. */
|
2425
|
+
timestamp?: InputMaybe<Scalars['DateTime']['input']>;
|
2426
|
+
/** The conversation message token usage, not including RAG context tokens. */
|
2427
|
+
tokens?: InputMaybe<Scalars['Int']['input']>;
|
2428
|
+
/** The time to first token (TTFT) for the model to complete the prompt. */
|
2429
|
+
ttft?: InputMaybe<Scalars['TimeSpan']['input']>;
|
2418
2430
|
};
|
2419
2431
|
/** Represents conversation query results. */
|
2420
2432
|
export type ConversationResults = {
|
@@ -7625,6 +7637,8 @@ export type ModelMetadata = {
|
|
7625
7637
|
multimodal?: Maybe<Scalars['Boolean']['output']>;
|
7626
7638
|
/** The prompt cost per-million tokens. */
|
7627
7639
|
promptCostPerMillion?: Maybe<Scalars['Float']['output']>;
|
7640
|
+
/** Whether the model supports reasoning. */
|
7641
|
+
reasoning?: Maybe<Scalars['Boolean']['output']>;
|
7628
7642
|
/** The reranking cost per-million tokens. */
|
7629
7643
|
rerankingCostPerMillion?: Maybe<Scalars['Float']['output']>;
|
7630
7644
|
};
|
@@ -8127,8 +8141,11 @@ export type MutationCloseConversationArgs = {
|
|
8127
8141
|
};
|
8128
8142
|
export type MutationCompleteConversationArgs = {
|
8129
8143
|
completion: Scalars['String']['input'];
|
8144
|
+
completionTime?: InputMaybe<Scalars['TimeSpan']['input']>;
|
8130
8145
|
correlationId?: InputMaybe<Scalars['String']['input']>;
|
8131
8146
|
id: Scalars['ID']['input'];
|
8147
|
+
throughput?: InputMaybe<Scalars['Float']['input']>;
|
8148
|
+
ttft?: InputMaybe<Scalars['TimeSpan']['input']>;
|
8132
8149
|
};
|
8133
8150
|
export type MutationContinueConversationArgs = {
|
8134
8151
|
correlationId?: InputMaybe<Scalars['String']['input']>;
|
@@ -8611,6 +8628,7 @@ export type MutationFormatConversationArgs = {
|
|
8611
8628
|
includeDetails?: InputMaybe<Scalars['Boolean']['input']>;
|
8612
8629
|
prompt: Scalars['String']['input'];
|
8613
8630
|
specification?: InputMaybe<EntityReferenceInput>;
|
8631
|
+
systemPrompt?: InputMaybe<Scalars['String']['input']>;
|
8614
8632
|
tools?: InputMaybe<Array<ToolDefinitionInput>>;
|
8615
8633
|
};
|
8616
8634
|
export type MutationIngestBatchArgs = {
|
@@ -8722,6 +8740,7 @@ export type MutationPromptConversationArgs = {
|
|
8722
8740
|
prompt: Scalars['String']['input'];
|
8723
8741
|
requireTool?: InputMaybe<Scalars['Boolean']['input']>;
|
8724
8742
|
specification?: InputMaybe<EntityReferenceInput>;
|
8743
|
+
systemPrompt?: InputMaybe<Scalars['String']['input']>;
|
8725
8744
|
tools?: InputMaybe<Array<ToolDefinitionInput>>;
|
8726
8745
|
};
|
8727
8746
|
export type MutationPromptSpecificationsArgs = {
|
@@ -8968,6 +8987,20 @@ export type NamedEntityReferenceInput = {
|
|
8968
8987
|
/** The name of the entity. */
|
8969
8988
|
name?: InputMaybe<Scalars['String']['input']>;
|
8970
8989
|
};
|
8990
|
+
/** Represents a Notion database. */
|
8991
|
+
export type NotionDatabaseResult = {
|
8992
|
+
__typename?: 'NotionDatabaseResult';
|
8993
|
+
/** The Notion database identifier. */
|
8994
|
+
identifier?: Maybe<Scalars['String']['output']>;
|
8995
|
+
/** The Notion database name. */
|
8996
|
+
name?: Maybe<Scalars['ID']['output']>;
|
8997
|
+
};
|
8998
|
+
/** Represents Notion libraries. */
|
8999
|
+
export type NotionDatabaseResults = {
|
9000
|
+
__typename?: 'NotionDatabaseResults';
|
9001
|
+
/** The Notion databases. */
|
9002
|
+
results?: Maybe<Array<Maybe<NotionDatabaseResult>>>;
|
9003
|
+
};
|
8971
9004
|
/** Represents Notion databases properties. */
|
8972
9005
|
export type NotionDatabasesInput = {
|
8973
9006
|
/** Notion integration token. */
|
@@ -9013,6 +9046,20 @@ export type NotionFeedPropertiesUpdateInput = {
|
|
9013
9046
|
/** Notion object type, i.e. page or database. */
|
9014
9047
|
type?: InputMaybe<NotionTypes>;
|
9015
9048
|
};
|
9049
|
+
/** Represents a Notion page. */
|
9050
|
+
export type NotionPageResult = {
|
9051
|
+
__typename?: 'NotionPageResult';
|
9052
|
+
/** The Notion page identifier. */
|
9053
|
+
identifier?: Maybe<Scalars['String']['output']>;
|
9054
|
+
/** The Notion page name. */
|
9055
|
+
name?: Maybe<Scalars['ID']['output']>;
|
9056
|
+
};
|
9057
|
+
/** Represents Notion libraries. */
|
9058
|
+
export type NotionPageResults = {
|
9059
|
+
__typename?: 'NotionPageResults';
|
9060
|
+
/** The Notion pages. */
|
9061
|
+
results?: Maybe<Array<Maybe<NotionPageResult>>>;
|
9062
|
+
};
|
9016
9063
|
/** Represents Notion pages properties. */
|
9017
9064
|
export type NotionPagesInput = {
|
9018
9065
|
/** Notion integration token. */
|
@@ -11143,9 +11190,9 @@ export type Query = {
|
|
11143
11190
|
/** Retrieves available LLMs, embedding models and reranker models. */
|
11144
11191
|
models?: Maybe<ModelCardResults>;
|
11145
11192
|
/** Retrieves available Notion databases. */
|
11146
|
-
notionDatabases?: Maybe<
|
11193
|
+
notionDatabases?: Maybe<NotionDatabaseResults>;
|
11147
11194
|
/** Retrieves available Notion pages within Notion database, non-recursive. */
|
11148
|
-
notionPages?: Maybe<
|
11195
|
+
notionPages?: Maybe<NotionPageResults>;
|
11149
11196
|
/** Lookup a observation given its ID. */
|
11150
11197
|
observation?: Maybe<Observation>;
|
11151
11198
|
/** Retrieves available OneDrive folders. */
|
@@ -14565,7 +14612,6 @@ export type GetCollectionQuery = {
|
|
14565
14612
|
id: string;
|
14566
14613
|
name: string;
|
14567
14614
|
creationDate: any;
|
14568
|
-
relevance?: number | null;
|
14569
14615
|
state: EntityState;
|
14570
14616
|
type?: CollectionTypes | null;
|
14571
14617
|
owner: {
|
@@ -14599,11 +14645,6 @@ export type QueryCollectionsQuery = {
|
|
14599
14645
|
__typename?: 'Owner';
|
14600
14646
|
id: string;
|
14601
14647
|
};
|
14602
|
-
contents?: Array<{
|
14603
|
-
__typename?: 'Content';
|
14604
|
-
id: string;
|
14605
|
-
name: string;
|
14606
|
-
} | null> | null;
|
14607
14648
|
}> | null;
|
14608
14649
|
} | null;
|
14609
14650
|
};
|
@@ -14702,6 +14743,7 @@ export type DescribeEncodedImageMutation = {
|
|
14702
14743
|
message?: string | null;
|
14703
14744
|
tokens?: number | null;
|
14704
14745
|
throughput?: number | null;
|
14746
|
+
ttft?: any | null;
|
14705
14747
|
completionTime?: any | null;
|
14706
14748
|
timestamp?: any | null;
|
14707
14749
|
modelService?: ModelServiceTypes | null;
|
@@ -14845,6 +14887,7 @@ export type DescribeImageMutation = {
|
|
14845
14887
|
message?: string | null;
|
14846
14888
|
tokens?: number | null;
|
14847
14889
|
throughput?: number | null;
|
14890
|
+
ttft?: any | null;
|
14848
14891
|
completionTime?: any | null;
|
14849
14892
|
timestamp?: any | null;
|
14850
14893
|
modelService?: ModelServiceTypes | null;
|
@@ -16579,49 +16622,11 @@ export type QueryContentsQuery = {
|
|
16579
16622
|
id: string;
|
16580
16623
|
name: string;
|
16581
16624
|
} | null;
|
16582
|
-
collections?: Array<{
|
16583
|
-
__typename?: 'Collection';
|
16584
|
-
id: string;
|
16585
|
-
name: string;
|
16586
|
-
} | null> | null;
|
16587
16625
|
links?: Array<{
|
16588
16626
|
__typename?: 'LinkReference';
|
16589
16627
|
uri?: any | null;
|
16590
16628
|
linkType?: LinkTypes | null;
|
16591
16629
|
}> | null;
|
16592
|
-
observations?: Array<{
|
16593
|
-
__typename?: 'Observation';
|
16594
|
-
id: string;
|
16595
|
-
type: ObservableTypes;
|
16596
|
-
relatedType?: ObservableTypes | null;
|
16597
|
-
relation?: string | null;
|
16598
|
-
state: EntityState;
|
16599
|
-
observable: {
|
16600
|
-
__typename?: 'NamedEntityReference';
|
16601
|
-
id: string;
|
16602
|
-
name?: string | null;
|
16603
|
-
};
|
16604
|
-
related?: {
|
16605
|
-
__typename?: 'NamedEntityReference';
|
16606
|
-
id: string;
|
16607
|
-
name?: string | null;
|
16608
|
-
} | null;
|
16609
|
-
occurrences?: Array<{
|
16610
|
-
__typename?: 'ObservationOccurrence';
|
16611
|
-
type?: OccurrenceTypes | null;
|
16612
|
-
confidence?: number | null;
|
16613
|
-
startTime?: any | null;
|
16614
|
-
endTime?: any | null;
|
16615
|
-
pageIndex?: number | null;
|
16616
|
-
boundingBox?: {
|
16617
|
-
__typename?: 'BoundingBox';
|
16618
|
-
left?: number | null;
|
16619
|
-
top?: number | null;
|
16620
|
-
width?: number | null;
|
16621
|
-
height?: number | null;
|
16622
|
-
} | null;
|
16623
|
-
} | null> | null;
|
16624
|
-
} | null> | null;
|
16625
16630
|
workflow?: {
|
16626
16631
|
__typename?: 'Workflow';
|
16627
16632
|
id: string;
|
@@ -16922,6 +16927,7 @@ export type AskGraphlitMutation = {
|
|
16922
16927
|
message?: string | null;
|
16923
16928
|
tokens?: number | null;
|
16924
16929
|
throughput?: number | null;
|
16930
|
+
ttft?: any | null;
|
16925
16931
|
completionTime?: any | null;
|
16926
16932
|
timestamp?: any | null;
|
16927
16933
|
modelService?: ModelServiceTypes | null;
|
@@ -17093,6 +17099,9 @@ export type CloseConversationMutation = {
|
|
17093
17099
|
export type CompleteConversationMutationVariables = Exact<{
|
17094
17100
|
completion: Scalars['String']['input'];
|
17095
17101
|
id: Scalars['ID']['input'];
|
17102
|
+
completionTime?: InputMaybe<Scalars['TimeSpan']['input']>;
|
17103
|
+
ttft?: InputMaybe<Scalars['TimeSpan']['input']>;
|
17104
|
+
throughput?: InputMaybe<Scalars['Float']['input']>;
|
17096
17105
|
correlationId?: InputMaybe<Scalars['String']['input']>;
|
17097
17106
|
}>;
|
17098
17107
|
export type CompleteConversationMutation = {
|
@@ -17111,6 +17120,7 @@ export type CompleteConversationMutation = {
|
|
17111
17120
|
message?: string | null;
|
17112
17121
|
tokens?: number | null;
|
17113
17122
|
throughput?: number | null;
|
17123
|
+
ttft?: any | null;
|
17114
17124
|
completionTime?: any | null;
|
17115
17125
|
timestamp?: any | null;
|
17116
17126
|
modelService?: ModelServiceTypes | null;
|
@@ -17304,6 +17314,7 @@ export type CompleteConversationMutation = {
|
|
17304
17314
|
message?: string | null;
|
17305
17315
|
tokens?: number | null;
|
17306
17316
|
throughput?: number | null;
|
17317
|
+
ttft?: any | null;
|
17307
17318
|
completionTime?: any | null;
|
17308
17319
|
timestamp?: any | null;
|
17309
17320
|
modelService?: ModelServiceTypes | null;
|
@@ -17455,6 +17466,7 @@ export type ContinueConversationMutation = {
|
|
17455
17466
|
message?: string | null;
|
17456
17467
|
tokens?: number | null;
|
17457
17468
|
throughput?: number | null;
|
17469
|
+
ttft?: any | null;
|
17458
17470
|
completionTime?: any | null;
|
17459
17471
|
timestamp?: any | null;
|
17460
17472
|
modelService?: ModelServiceTypes | null;
|
@@ -17648,6 +17660,7 @@ export type ContinueConversationMutation = {
|
|
17648
17660
|
message?: string | null;
|
17649
17661
|
tokens?: number | null;
|
17650
17662
|
throughput?: number | null;
|
17663
|
+
ttft?: any | null;
|
17651
17664
|
completionTime?: any | null;
|
17652
17665
|
timestamp?: any | null;
|
17653
17666
|
modelService?: ModelServiceTypes | null;
|
@@ -17844,6 +17857,7 @@ export type FormatConversationMutationVariables = Exact<{
|
|
17844
17857
|
id?: InputMaybe<Scalars['ID']['input']>;
|
17845
17858
|
specification?: InputMaybe<EntityReferenceInput>;
|
17846
17859
|
tools?: InputMaybe<Array<ToolDefinitionInput> | ToolDefinitionInput>;
|
17860
|
+
systemPrompt?: InputMaybe<Scalars['String']['input']>;
|
17847
17861
|
includeDetails?: InputMaybe<Scalars['Boolean']['input']>;
|
17848
17862
|
correlationId?: InputMaybe<Scalars['String']['input']>;
|
17849
17863
|
}>;
|
@@ -17863,6 +17877,7 @@ export type FormatConversationMutation = {
|
|
17863
17877
|
message?: string | null;
|
17864
17878
|
tokens?: number | null;
|
17865
17879
|
throughput?: number | null;
|
17880
|
+
ttft?: any | null;
|
17866
17881
|
completionTime?: any | null;
|
17867
17882
|
timestamp?: any | null;
|
17868
17883
|
modelService?: ModelServiceTypes | null;
|
@@ -18056,6 +18071,7 @@ export type FormatConversationMutation = {
|
|
18056
18071
|
message?: string | null;
|
18057
18072
|
tokens?: number | null;
|
18058
18073
|
throughput?: number | null;
|
18074
|
+
ttft?: any | null;
|
18059
18075
|
completionTime?: any | null;
|
18060
18076
|
timestamp?: any | null;
|
18061
18077
|
modelService?: ModelServiceTypes | null;
|
@@ -18212,6 +18228,7 @@ export type GetConversationQuery = {
|
|
18212
18228
|
message?: string | null;
|
18213
18229
|
tokens?: number | null;
|
18214
18230
|
throughput?: number | null;
|
18231
|
+
ttft?: any | null;
|
18215
18232
|
completionTime?: any | null;
|
18216
18233
|
timestamp?: any | null;
|
18217
18234
|
modelService?: ModelServiceTypes | null;
|
@@ -18591,6 +18608,7 @@ export type PromptMutation = {
|
|
18591
18608
|
message?: string | null;
|
18592
18609
|
tokens?: number | null;
|
18593
18610
|
throughput?: number | null;
|
18611
|
+
ttft?: any | null;
|
18594
18612
|
completionTime?: any | null;
|
18595
18613
|
timestamp?: any | null;
|
18596
18614
|
modelService?: ModelServiceTypes | null;
|
@@ -18726,6 +18744,7 @@ export type PromptConversationMutationVariables = Exact<{
|
|
18726
18744
|
data?: InputMaybe<Scalars['String']['input']>;
|
18727
18745
|
id?: InputMaybe<Scalars['ID']['input']>;
|
18728
18746
|
specification?: InputMaybe<EntityReferenceInput>;
|
18747
|
+
systemPrompt?: InputMaybe<Scalars['String']['input']>;
|
18729
18748
|
tools?: InputMaybe<Array<ToolDefinitionInput> | ToolDefinitionInput>;
|
18730
18749
|
requireTool?: InputMaybe<Scalars['Boolean']['input']>;
|
18731
18750
|
includeDetails?: InputMaybe<Scalars['Boolean']['input']>;
|
@@ -18747,6 +18766,7 @@ export type PromptConversationMutation = {
|
|
18747
18766
|
message?: string | null;
|
18748
18767
|
tokens?: number | null;
|
18749
18768
|
throughput?: number | null;
|
18769
|
+
ttft?: any | null;
|
18750
18770
|
completionTime?: any | null;
|
18751
18771
|
timestamp?: any | null;
|
18752
18772
|
modelService?: ModelServiceTypes | null;
|
@@ -18940,6 +18960,7 @@ export type PromptConversationMutation = {
|
|
18940
18960
|
message?: string | null;
|
18941
18961
|
tokens?: number | null;
|
18942
18962
|
throughput?: number | null;
|
18963
|
+
ttft?: any | null;
|
18943
18964
|
completionTime?: any | null;
|
18944
18965
|
timestamp?: any | null;
|
18945
18966
|
modelService?: ModelServiceTypes | null;
|
@@ -19230,6 +19251,7 @@ export type QueryConversationsQuery = {
|
|
19230
19251
|
message?: string | null;
|
19231
19252
|
tokens?: number | null;
|
19232
19253
|
throughput?: number | null;
|
19254
|
+
ttft?: any | null;
|
19233
19255
|
completionTime?: any | null;
|
19234
19256
|
timestamp?: any | null;
|
19235
19257
|
modelService?: ModelServiceTypes | null;
|
@@ -19638,6 +19660,7 @@ export type ReviseContentMutation = {
|
|
19638
19660
|
message?: string | null;
|
19639
19661
|
tokens?: number | null;
|
19640
19662
|
throughput?: number | null;
|
19663
|
+
ttft?: any | null;
|
19641
19664
|
completionTime?: any | null;
|
19642
19665
|
timestamp?: any | null;
|
19643
19666
|
modelService?: ModelServiceTypes | null;
|
@@ -19791,6 +19814,7 @@ export type ReviseEncodedImageMutation = {
|
|
19791
19814
|
message?: string | null;
|
19792
19815
|
tokens?: number | null;
|
19793
19816
|
throughput?: number | null;
|
19817
|
+
ttft?: any | null;
|
19794
19818
|
completionTime?: any | null;
|
19795
19819
|
timestamp?: any | null;
|
19796
19820
|
modelService?: ModelServiceTypes | null;
|
@@ -19943,6 +19967,7 @@ export type ReviseImageMutation = {
|
|
19943
19967
|
message?: string | null;
|
19944
19968
|
tokens?: number | null;
|
19945
19969
|
throughput?: number | null;
|
19970
|
+
ttft?: any | null;
|
19946
19971
|
completionTime?: any | null;
|
19947
19972
|
timestamp?: any | null;
|
19948
19973
|
modelService?: ModelServiceTypes | null;
|
@@ -20095,6 +20120,7 @@ export type ReviseTextMutation = {
|
|
20095
20120
|
message?: string | null;
|
20096
20121
|
tokens?: number | null;
|
20097
20122
|
throughput?: number | null;
|
20123
|
+
ttft?: any | null;
|
20098
20124
|
completionTime?: any | null;
|
20099
20125
|
timestamp?: any | null;
|
20100
20126
|
modelService?: ModelServiceTypes | null;
|
@@ -21118,8 +21144,12 @@ export type QueryNotionDatabasesQueryVariables = Exact<{
|
|
21118
21144
|
export type QueryNotionDatabasesQuery = {
|
21119
21145
|
__typename?: 'Query';
|
21120
21146
|
notionDatabases?: {
|
21121
|
-
__typename?: '
|
21122
|
-
results?: Array<
|
21147
|
+
__typename?: 'NotionDatabaseResults';
|
21148
|
+
results?: Array<{
|
21149
|
+
__typename?: 'NotionDatabaseResult';
|
21150
|
+
name?: string | null;
|
21151
|
+
identifier?: string | null;
|
21152
|
+
} | null> | null;
|
21123
21153
|
} | null;
|
21124
21154
|
};
|
21125
21155
|
export type QueryNotionPagesQueryVariables = Exact<{
|
@@ -21129,8 +21159,12 @@ export type QueryNotionPagesQueryVariables = Exact<{
|
|
21129
21159
|
export type QueryNotionPagesQuery = {
|
21130
21160
|
__typename?: 'Query';
|
21131
21161
|
notionPages?: {
|
21132
|
-
__typename?: '
|
21133
|
-
results?: Array<
|
21162
|
+
__typename?: 'NotionPageResults';
|
21163
|
+
results?: Array<{
|
21164
|
+
__typename?: 'NotionPageResult';
|
21165
|
+
name?: string | null;
|
21166
|
+
identifier?: string | null;
|
21167
|
+
} | null> | null;
|
21134
21168
|
} | null;
|
21135
21169
|
};
|
21136
21170
|
export type QueryOneDriveFoldersQueryVariables = Exact<{
|
@@ -23908,6 +23942,7 @@ export type PromptSpecificationsMutation = {
|
|
23908
23942
|
message?: string | null;
|
23909
23943
|
tokens?: number | null;
|
23910
23944
|
throughput?: number | null;
|
23945
|
+
ttft?: any | null;
|
23911
23946
|
completionTime?: any | null;
|
23912
23947
|
timestamp?: any | null;
|
23913
23948
|
modelService?: ModelServiceTypes | null;
|
@@ -24062,6 +24097,7 @@ export type QueryModelsQuery = {
|
|
24062
24097
|
} | null;
|
24063
24098
|
metadata?: {
|
24064
24099
|
__typename?: 'ModelMetadata';
|
24100
|
+
reasoning?: boolean | null;
|
24065
24101
|
multilingual?: boolean | null;
|
24066
24102
|
multimodal?: boolean | null;
|
24067
24103
|
knowledgeCutoff?: any | null;
|
@@ -25,6 +25,7 @@ export declare class UIEventAdapter {
|
|
25
25
|
private smoothingDelay;
|
26
26
|
private chunkQueue;
|
27
27
|
private contextWindowUsage?;
|
28
|
+
private finalMetrics?;
|
28
29
|
constructor(onEvent: (event: AgentStreamEvent) => void, conversationId: string, options?: {
|
29
30
|
smoothingEnabled?: boolean;
|
30
31
|
chunkingStrategy?: ChunkingStrategy;
|
@@ -55,4 +56,16 @@ export declare class UIEventAdapter {
|
|
55
56
|
* Clean up any pending timers
|
56
57
|
*/
|
57
58
|
dispose(): void;
|
59
|
+
/**
|
60
|
+
* Get the total completion time in milliseconds
|
61
|
+
*/
|
62
|
+
getCompletionTime(): number | undefined;
|
63
|
+
/**
|
64
|
+
* Get the time to first token in milliseconds
|
65
|
+
*/
|
66
|
+
getTTFT(): number | undefined;
|
67
|
+
/**
|
68
|
+
* Get the throughput in tokens per second
|
69
|
+
*/
|
70
|
+
getThroughput(): number | undefined;
|
58
71
|
}
|
@@ -24,6 +24,7 @@ export class UIEventAdapter {
|
|
24
24
|
smoothingDelay = 30;
|
25
25
|
chunkQueue = []; // Queue of chunks waiting to be emitted
|
26
26
|
contextWindowUsage;
|
27
|
+
finalMetrics;
|
27
28
|
constructor(onEvent, conversationId, options = {}) {
|
28
29
|
this.onEvent = onEvent;
|
29
30
|
this.conversationId = conversationId;
|
@@ -327,6 +328,8 @@ export class UIEventAdapter {
|
|
327
328
|
finalMetrics.streamingThroughput = Math.round((this.currentMessage.length / streamingTime) * 1000);
|
328
329
|
}
|
329
330
|
}
|
331
|
+
// Store final metrics for later retrieval
|
332
|
+
this.finalMetrics = finalMetrics;
|
330
333
|
// Include context window usage if available
|
331
334
|
const event = {
|
332
335
|
type: "conversation_completed",
|
@@ -499,4 +502,22 @@ export class UIEventAdapter {
|
|
499
502
|
}
|
500
503
|
this.activeToolCalls.clear();
|
501
504
|
}
|
505
|
+
/**
|
506
|
+
* Get the total completion time in milliseconds
|
507
|
+
*/
|
508
|
+
getCompletionTime() {
|
509
|
+
return this.finalMetrics?.totalTime;
|
510
|
+
}
|
511
|
+
/**
|
512
|
+
* Get the time to first token in milliseconds
|
513
|
+
*/
|
514
|
+
getTTFT() {
|
515
|
+
return this.finalMetrics?.ttft;
|
516
|
+
}
|
517
|
+
/**
|
518
|
+
* Get the throughput in tokens per second
|
519
|
+
*/
|
520
|
+
getThroughput() {
|
521
|
+
return this.finalMetrics?.streamingThroughput;
|
522
|
+
}
|
502
523
|
}
|