Buckets:
| import type { Part, UserMessage } from "./client.js" | |
| export const message = { | |
| user(input: Omit<UserMessage, "role" | "time" | "id"> & { parts: Omit<Part, "id" | "sessionID" | "messageID">[] }): { | |
| info: UserMessage | |
| parts: Part[] | |
| } { | |
| const { parts: _parts, ...rest } = input | |
| const info: UserMessage = { | |
| ...rest, | |
| id: "asdasd", | |
| time: { | |
| created: Date.now(), | |
| }, | |
| role: "user", | |
| } | |
| return { | |
| info, | |
| parts: input.parts.map( | |
| (part) => | |
| ({ | |
| ...part, | |
| id: "asdasd", | |
| messageID: info.id, | |
| sessionID: info.sessionID, | |
| }) as Part, | |
| ), | |
| } | |
| }, | |
| } | |
Xet Storage Details
- Size:
- 685 Bytes
- Xet hash:
- 4229bdc5732e347b15b30f83d9d24f9a0671d201a6203612328eff71945ba549
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.