Download packages/core/src/plugin/provider/cohere.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 421 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/core/src/plugin/provider/cohere.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/core/src/plugin/provider/cohere.ts
-
curl -L -o cohere.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/core/src/plugin/provider/cohere.ts
421 Bytes
| import { Effect } from "effect" | |
| import { define } from "../internal" | |
| export const CoherePlugin = define({ | |
| id: "cohere", | |
| effect: Effect.fn(function* (ctx) { | |
| yield* ctx.aisdk.sdk( | |
| Effect.fn(function* (evt) { | |
| if (evt.package !== "@ai-sdk/cohere") return | |
| const mod = yield* Effect.promise(() => import("@ai-sdk/cohere")) | |
| evt.sdk = mod.createCohere(evt.options) | |
| }), | |
| ) | |
| }), | |
| }) | |