refactor: unify LLM configuration types

This commit is contained in:
Simon
2025-12-23 17:37:09 +08:00
parent 7911bac052
commit 17befe4bab
3 changed files with 7 additions and 26 deletions

View File

@@ -2,20 +2,13 @@
* OpenAI Client implementation
*/
import { InvokeError, InvokeErrorType } from './errors'
import type {
InvokeResult,
LLMClient,
MacroToolInput,
Message,
OpenAIClientConfig,
Tool,
} from './types'
import type { InvokeResult, LLMClient, LLMConfig, MacroToolInput, Message, Tool } from './types'
import { lenientParseMacroToolCall, modelPatch, zodToOpenAITool } from './utils'
export class OpenAIClient implements LLMClient {
config: OpenAIClientConfig
config: LLMConfig
constructor(config: OpenAIClientConfig) {
constructor(config: LLMConfig) {
this.config = config
}