mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:30:42 +00:00
fix(openai): reuse canonical responses stream hooks
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
matchesExactOrPrefix,
|
||||
type ProviderPlugin,
|
||||
} from "openclaw/plugin-sdk/provider-model-shared";
|
||||
import { buildProviderStreamFamilyHooks } from "openclaw/plugin-sdk/provider-stream-family";
|
||||
import { OPENAI_RESPONSES_STREAM_HOOKS } from "openclaw/plugin-sdk/provider-stream-family";
|
||||
import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime";
|
||||
import { buildOpenAIReplayPolicy } from "./replay-policy.js";
|
||||
import {
|
||||
@@ -32,9 +32,6 @@ type SyntheticOpenAIModelCatalogEntry = {
|
||||
};
|
||||
|
||||
export const OPENAI_API_BASE_URL = "https://api.openai.com/v1";
|
||||
export const OPENAI_RESPONSES_STREAM_HOOKS = buildProviderStreamFamilyHooks(
|
||||
"openai-responses-defaults",
|
||||
);
|
||||
|
||||
export function toOpenAIDataUrl(buffer: Buffer, mimeType: string): string {
|
||||
return `data:${mimeType};base64,${buffer.toString("base64")}`;
|
||||
|
||||
Reference in New Issue
Block a user