start static method
Start a bot conversation.
This starts a multi-turn loop where a local Ollama model generates prompts for Copilot (or for another local model persona in self-talk mode). The call blocks until the conversation completes.
goal — what the conversation should achieve (required).
description — additional context or constraints.
profile — conversation profile key (null → default config).
maxTurns — override max turns (null → profile/config default).
temperature — override temperature (null → profile/config default).
modelConfig — override model config key.
historyMode — override history mode.
includeFileContext — workspace file paths to include as context.
pauseBetweenTurns — pause for user review between turns.
conversationMode — ollamaCopilot or ollamaOllama.
timeoutSeconds — max wait time (default 1800s = 30 min).
Implementation
static Future<ConversationResult> start({
required String goal,
String? description,
String? profile,
int? maxTurns,
double? temperature,
String? modelConfig,
HistoryMode? historyMode,
List<String>? includeFileContext,
bool? pauseBetweenTurns,
ConversationMode? conversationMode,
int timeoutSeconds = 1800,
}) async {
final result = await _adapter.sendRequest(
'botConversation.startVce',
{
'goal': goal,
'description': ?description,
'profile': ?profile,
'maxTurns': ?maxTurns,
'temperature': ?temperature,
'modelConfig': ?modelConfig,
'historyMode': ?historyMode?.value,
'includeFileContext': ?includeFileContext,
'pauseBetweenTurns': ?pauseBetweenTurns,
'conversationMode': ?conversationMode?.value,
},
scriptName: 'AiConversationApi.start',
timeout: Duration(seconds: timeoutSeconds),
);
return ConversationResult.fromJson(result);
}