littlebrian's picture
Sync from enhance: d795216 feat: implement patch response parser for search and replace functionality
9bd4242
Raw
History Blame Contribute Delete
518 Bytes
/**
* Code Retry Service - OpenAI 客户端管理
*/
import OpenAI from 'openai'
import type { CustomApiConfig } from '../../types'
import { createCustomOpenAIClient } from '../openai-client-factory'
/**
* 获取 OpenAI 客户端
*/
export function getClient(customApiConfig?: CustomApiConfig): OpenAI | null {
if (customApiConfig) {
return createCustomOpenAIClient(customApiConfig)
}
return null
}
/**
* 检查客户端是否可用
*/
export function isClientAvailable(): boolean {
return true
}