mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
feat: support openai response api
This commit is contained in:
@@ -15,6 +15,7 @@ export const createModel = (model: ModelConfig) => {
|
||||
|
||||
switch (model.clientType) {
|
||||
case ClientType.OpenAI:
|
||||
return createOpenAI({ apiKey, baseURL })(modelId)
|
||||
case ClientType.OpenAICompat:
|
||||
case ClientType.Ollama:
|
||||
case ClientType.Dashscope: {
|
||||
|
||||
@@ -44,7 +44,7 @@ export const extractAttachmentsFromText = (text: string): { cleanedText: string;
|
||||
const paths: string[] = []
|
||||
const cleanedText = text.replace(
|
||||
/<attachments>([\s\S]*?)<\/attachments>/g,
|
||||
(_match, inner: string) => {
|
||||
(_match, inner: string) => {
|
||||
paths.push(...parseAttachmentPaths(inner))
|
||||
return ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user