feat: wire TradingGraph to use settings for model, temperature, and risk config
This commit is contained in:
@@ -36,7 +36,8 @@ export class OpenRouterClient {
|
||||
|
||||
async createChatCompletion(
|
||||
messages: Message[],
|
||||
model?: string
|
||||
model?: string,
|
||||
options?: { temperature?: number; max_tokens?: number }
|
||||
): Promise<unknown> {
|
||||
const response = await fetch(`${this.baseURL}/chat/completions`, {
|
||||
method: "POST",
|
||||
@@ -49,6 +50,8 @@ export class OpenRouterClient {
|
||||
body: JSON.stringify({
|
||||
model: model ?? this.defaultModel,
|
||||
messages,
|
||||
...(options?.temperature != null && { temperature: options.temperature }),
|
||||
...(options?.max_tokens != null && { max_tokens: options.max_tokens }),
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user