graphlit-client 1.0.20250615006 → 1.0.20250617002

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
@@ -177,6 +177,7 @@ declare class Graphlit {
177
177
  formatConversation(prompt: string, id?: string, specification?: Types.EntityReferenceInput, tools?: Types.ToolDefinitionInput[], includeDetails?: boolean, correlationId?: string): Promise<Types.FormatConversationMutation>;
178
178
  completeConversation(completion: string, id: string, correlationId?: string): Promise<Types.CompleteConversationMutation>;
179
179
  askGraphlit(prompt: string, type?: Types.SdkTypes, id?: string, specification?: Types.EntityReferenceInput, correlationId?: string): Promise<Types.AskGraphlitMutation>;
180
+ branchConversation(id: string): Promise<Types.BranchConversationMutation>;
180
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
182
  continueConversation(id: string, responses: Types.ConversationToolResponseInput[], correlationId?: string): Promise<Types.ContinueConversationMutation>;
182
183
  publishConversation(id: string, connector: Types.ContentPublishingConnectorInput, name?: string, workflow?: Types.EntityReferenceInput, isSynchronous?: boolean, correlationId?: string): Promise<Types.PublishConversationMutation>;
package/dist/client.js CHANGED
@@ -817,6 +817,11 @@ class Graphlit {
817
817
  correlationId: correlationId,
818
818
  });
819
819
  }
820
+ async branchConversation(id) {
821
+ return this.mutateAndCheckError(Documents.BranchConversation, {
822
+ id: id,
823
+ });
824
+ }
820
825
  async promptConversation(prompt, id, specification, mimeType, data, tools, requireTool, includeDetails, correlationId) {
821
826
  return this.mutateAndCheckError(Documents.PromptConversation, {
822
827
  prompt: prompt,
@@ -2392,8 +2397,9 @@ class Graphlit {
2392
2397
  }
2393
2398
  // Complete the conversation and get token count
2394
2399
  let finalTokens;
2395
- if (fullMessage) {
2396
- const completeResponse = await this.completeConversation(fullMessage.trim(), conversationId, correlationId);
2400
+ const trimmedMessage = fullMessage?.trim();
2401
+ if (trimmedMessage) {
2402
+ const completeResponse = await this.completeConversation(trimmedMessage, conversationId, correlationId);
2397
2403
  // Extract token count from the response
2398
2404
  finalTokens =
2399
2405
  completeResponse.completeConversation?.message?.tokens ?? undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphlit-client",
3
- "version": "1.0.20250615006",
3
+ "version": "1.0.20250617002",
4
4
  "description": "Graphlit API Client for TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/client.js",