@markprompt/core
Advanced tools
Comparing version 0.35.1 to 0.35.2
@@ -48,2 +48,3 @@ import defaults from 'defaults'; | ||
'X-Markprompt-API-Version': '2024-05-21', | ||
...(resolvedOptions.headers ? resolvedOptions.headers : {}), | ||
}), | ||
@@ -78,2 +79,3 @@ body: JSON.stringify({ | ||
references: json.references, | ||
steps: json.steps, | ||
role: 'assistant', | ||
@@ -80,0 +82,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import type { ChatCompletionTool, ChatCompletionToolChoiceOption } from 'openai/resources/chat/index.js'; | ||
import type { ChatCompletionMessageToolCall, ChatCompletionTool, ChatCompletionToolChoiceOption } from 'openai/resources/chat/index.js'; | ||
import { FileSectionReference } from '../types.js'; | ||
@@ -16,2 +16,3 @@ import type { ArrayToUnion } from '../utils.js'; | ||
references?: FileSectionReference[]; | ||
steps?: ChatCompletionMessageToolCall[]; | ||
/** | ||
@@ -25,2 +26,3 @@ * @deprecated Use `messageId` instead. | ||
references?: FileSectionReference[]; | ||
steps?: ChatCompletionMessageToolCall[]; | ||
responseId: string; | ||
@@ -146,2 +148,12 @@ } | ||
/** | ||
* Whether or not to use the agentic architecture | ||
* @default false | ||
* */ | ||
agentic?: boolean; | ||
/** | ||
* Whether or not to rerank retrieved context sections | ||
* @default false | ||
* */ | ||
useReranker?: boolean; | ||
/** | ||
* The number of sections to include in the prompt context. | ||
@@ -187,3 +199,3 @@ * @default 10 | ||
/** | ||
* Whether or not to skip the system instructions. | ||
* Whether or not to skip system instructions. | ||
* @default false | ||
@@ -190,0 +202,0 @@ **/ |
import { isFileSectionReferences } from '../utils.js'; | ||
const VALID_OPTIONS_KEYS = [ | ||
'additionalMetadata', | ||
'agentic', | ||
'allowFollowUpQuestions', | ||
'apiUrl', | ||
'assistantId', | ||
'assistantVersionId', | ||
'apiUrl', | ||
'allowFollowUpQuestions', | ||
'context', | ||
'debug', | ||
'doNotInjectContext', | ||
'skipSystemInstructions', | ||
'excludeFromInsights', | ||
'frequencyPenalty', | ||
'headers', | ||
'iDontKnowMessage', | ||
@@ -24,2 +26,3 @@ 'jsonOutput', | ||
'sectionsMatchThreshold', | ||
'skipSystemInstructions', | ||
'stream', | ||
@@ -33,3 +36,3 @@ 'systemPrompt', | ||
'topP', | ||
'additionalMetadata', | ||
'useReranker', | ||
]; | ||
@@ -36,0 +39,0 @@ export const isValidSubmitChatOptionsKey = (key) => { |
import defaults from 'defaults'; | ||
import { DEFAULT_OPTIONS } from './constants.js'; | ||
const allowedOptionKeys = ['signal', 'apiUrl']; | ||
const allowedOptionKeys = ['signal', 'apiUrl', 'headers']; | ||
export const DEFAULT_SUBMIT_FEEDBACK_OPTIONS = {}; | ||
@@ -21,2 +21,3 @@ export async function submitFeedback(body, projectKey, options = {}) { | ||
'X-Markprompt-API-Version': '2024-05-21', | ||
...(resolvedOptions.headers ? resolvedOptions.headers : {}), | ||
}), | ||
@@ -60,2 +61,3 @@ body: JSON.stringify({ | ||
'X-Markprompt-API-Version': '2024-05-21', | ||
...(resolvedOptions.headers ? resolvedOptions.headers : {}), | ||
}), | ||
@@ -62,0 +64,0 @@ body: JSON.stringify({ projectKey, csat: body.csat }), |
@@ -32,2 +32,3 @@ import defaults from 'defaults'; | ||
'X-Markprompt-API-Version': '2023-12-01', | ||
...(resolvedOptions.headers ? resolvedOptions.headers : {}), | ||
}), | ||
@@ -34,0 +35,0 @@ }); |
@@ -52,3 +52,6 @@ export type SourceType = 'github' | 'motif' | 'website' | 'file-upload' | 'api-upload' | 'nango' | 'salesforce'; | ||
apiUrl?: string; | ||
headers?: { | ||
[key: string]: string; | ||
}; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@markprompt/core", | ||
"version": "0.35.1", | ||
"version": "0.35.2", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
65850
984