AiModelChatCompletion Method (AiChatHistory, IEnumerableAiTool, CompletionSettings)

Spotfire 15.0 API Reference
Gets a chat completion from the AI model based on the provided chat history and tools. The model may invoke tools during the conversation and will return the final text response.

Namespace:  Spotfire.Dxp.Framework.Ai
Assembly:  Spotfire.Dxp.Framework (in Spotfire.Dxp.Framework.dll) Version: 71.0.22122.5390 (71.0.22122.5390)
Syntax

C#
public abstract string ChatCompletion(
	AiChatHistory history,
	IEnumerable<AiTool> tools,
	CompletionSettings settings = null
)

Parameters

history
Type: Spotfire.Dxp.Framework.AiAiChatHistory
The chat history.
tools
Type: System.Collections.GenericIEnumerableAiTool
The tools available for the model to call during completion.
settings (Optional)
Type: Spotfire.Dxp.Framework.AiCompletionSettings
The completion settings for the model.

Return Value

Type: String
The final text response from the model.
Exceptions

ExceptionCondition
AiModelExceptionThrown when the AI model provider returns an error.
Version Information

Supported in: 15.0
See Also

Reference