fix: rm maxTokens from api
This commit is contained in:
@@ -38,7 +38,6 @@ export class OpenAIClient implements LLMClient {
|
||||
modelPatch({
|
||||
model: this.config.model,
|
||||
temperature: this.config.temperature,
|
||||
max_tokens: this.config.maxTokens,
|
||||
messages,
|
||||
|
||||
tools: openaiTools,
|
||||
|
||||
@@ -35,7 +35,6 @@ export class OpenAIClient implements LLMClient {
|
||||
modelPatch({
|
||||
model: this.config.model,
|
||||
temperature: this.config.temperature,
|
||||
max_tokens: this.config.maxTokens,
|
||||
messages,
|
||||
|
||||
tools: openaiTools,
|
||||
|
||||
@@ -18,4 +18,3 @@ export const DEFAULT_BASE_URL: string =
|
||||
|
||||
export const LLM_MAX_RETRIES = 2
|
||||
export const DEFAULT_TEMPERATURE = 0.7 // higher randomness helps auto-recovery
|
||||
export const DEFAULT_MAX_TOKENS = 16000
|
||||
|
||||
@@ -35,7 +35,6 @@ import { OpenAIClient } from './OpenAILenientClient'
|
||||
import {
|
||||
DEFAULT_API_KEY,
|
||||
DEFAULT_BASE_URL,
|
||||
DEFAULT_MAX_TOKENS,
|
||||
DEFAULT_MODEL_NAME,
|
||||
DEFAULT_TEMPERATURE,
|
||||
LLM_MAX_RETRIES,
|
||||
@@ -69,7 +68,6 @@ export function parseLLMConfig(config: LLMConfig): Required<LLMConfig> {
|
||||
apiKey: config.apiKey ?? DEFAULT_API_KEY,
|
||||
model: config.model ?? DEFAULT_MODEL_NAME,
|
||||
temperature: config.temperature ?? DEFAULT_TEMPERATURE,
|
||||
maxTokens: config.maxTokens ?? DEFAULT_MAX_TOKENS,
|
||||
maxRetries: config.maxRetries ?? LLM_MAX_RETRIES,
|
||||
customFetch: (config.customFetch ?? fetch).bind(globalThis), // fetch will be illegal unless bound
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ export interface LLMConfig {
|
||||
model?: string
|
||||
|
||||
temperature?: number
|
||||
maxTokens?: number
|
||||
maxRetries?: number
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user