Download packages/schema/src/llm.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/schema/src/llm.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/schema/src/llm.ts
-
curl -L -o llm.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/schema/src/llm.ts
1.09 kB
| export * as LLM from "./llm" | |
| import { Schema } from "effect" | |
| import { optional } from "./schema" | |
| export const ProviderMetadata = Schema.Record(Schema.String, Schema.Record(Schema.String, Schema.Unknown)).annotate({ | |
| identifier: "LLM.ProviderMetadata", | |
| }) | |
| export type ProviderMetadata = Schema.Schema.Type<typeof ProviderMetadata> | |
| export interface ToolTextContent extends Schema.Schema.Type<typeof ToolTextContent> {} | |
| export const ToolTextContent = Schema.Struct({ | |
| type: Schema.Literal("text"), | |
| text: Schema.String, | |
| }).annotate({ identifier: "Tool.TextContent" }) | |
| export interface ToolFileContent extends Schema.Schema.Type<typeof ToolFileContent> {} | |
| export const ToolFileContent = Schema.Struct({ | |
| type: Schema.Literal("file"), | |
| uri: Schema.String, | |
| mime: Schema.String, | |
| name: optional(Schema.String), | |
| }).annotate({ identifier: "Tool.FileContent" }) | |
| export const ToolContent = Schema.Union([ToolTextContent, ToolFileContent]) | |
| .pipe(Schema.toTaggedUnion("type")) | |
| .annotate({ identifier: "LLM.ToolContent" }) | |
| export type ToolContent = Schema.Schema.Type<typeof ToolContent> | |