@markprompt/core
Advanced tools
Comparing version 0.31.2 to 0.31.3
@@ -133,2 +133,7 @@ import type { BaseOptions, Chat, ChatCompletionMessage, ChatCompletionMessageParam, ChatCompletionMetadata, ChatCompletionTool, ChatCompletionToolChoiceOption, ChatCompletionsModel } from './types.js'; | ||
/** | ||
* Metadata to attach to the thread. | ||
* @default undefined | ||
*/ | ||
threadMetadata?: any; | ||
/** | ||
* A list of tools the model may call. Currently, only functions are | ||
@@ -135,0 +140,0 @@ * supported as a tool. Use this to provide a list of functions the model may |
@@ -41,2 +41,3 @@ import defaults from 'defaults'; | ||
'threadId', | ||
'threadMetadata', | ||
'toolChoice', | ||
@@ -68,3 +69,3 @@ 'tools', | ||
...cloneableOpts, | ||
// only include known tool properties | ||
// Only include known tool properties | ||
tools: tools?.map((tool) => ({ | ||
@@ -75,3 +76,10 @@ function: tool.function, | ||
toolChoice: toolChoice, | ||
}, { ...DEFAULT_OPTIONS, ...DEFAULT_SUBMIT_CHAT_OPTIONS }); | ||
}, { | ||
...DEFAULT_OPTIONS, | ||
// If assistantId is provided, do not set default values, | ||
// as it will then override the assistant-provided values | ||
// in case that allowClientSideOverrides is set for the | ||
// assistant. | ||
...(validOptions.assistantId ? {} : DEFAULT_SUBMIT_CHAT_OPTIONS), | ||
}); | ||
const res = await fetch(`${resolvedOptions.apiUrl}/chat`, { | ||
@@ -78,0 +86,0 @@ method: 'POST', |
{ | ||
"name": "@markprompt/core", | ||
"version": "0.31.2", | ||
"version": "0.31.3", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64904
938