(input: Prompt, ast: AST.AST)
| 1381 | }) |
| 1382 | |
| 1383 | const encodePrompt = (input: Prompt, ast: AST.AST) => |
| 1384 | ParseResult.mapBoth(encodeMessages(input.content), { |
| 1385 | onFailure: () => new ParseResult.Type(ast, input, `Failed to encode Prompt`), |
| 1386 | onSuccess: (messages) => ({ content: messages }) |
| 1387 | }) |
| 1388 | |
| 1389 | /** |
| 1390 | * Schema for parsing a Prompt from JSON strings. |
no outgoing calls
no test coverage detected
searching dependent graphs…