GHHG10/CodeServer / opencode /packages /core /src /plugin /provider /openai-compatible.ts
GHHG10's picture
download
raw
624 Bytes
import { Effect } from "effect"
import { PluginV2 } from "../../plugin"
export const OpenAICompatiblePlugin = PluginV2.define({
id: PluginV2.ID.make("openai-compatible"),
effect: Effect.gen(function* () {
return {
"aisdk.sdk": Effect.fn(function* (evt) {
if (evt.sdk) return
if (!evt.package.includes("@ai-sdk/openai-compatible")) return
if (evt.options.includeUsage !== false) evt.options.includeUsage = true
const mod = yield* Effect.promise(() => import("@ai-sdk/openai-compatible"))
evt.sdk = mod.createOpenAICompatible(evt.options as any)
}),
}
}),
})

Xet Storage Details

Size:
624 Bytes
·
Xet hash:
c1c82bb11c9b9da643aee21459011165166a4a92e5774b9a9f3a7af28e360dc8

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.