MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / FormattedOutput

Function FormattedOutput

app/src/components/nodeEntries/FormattedOutput.tsx:8–27  ·  view source on GitHub ↗
({
  output,
  preferJson,
}: {
  output: DatasetEntryOutput["output"];
  preferJson: boolean;
})

Source from the content-addressed store, hash-verified

6import FormattedMessage from "./FormattedMessage";
7
8const FormattedOutput = ({
9 output,
10 preferJson,
11}: {
12 output: DatasetEntryOutput["output"];
13 preferJson: boolean;
14}) => {
15 const parsed = chatCompletionMessage.safeParse(output);
16
17 if (!parsed.success) {
18 return (
19 <VStack>
20 <Text color="red.500">Unable to parse output</Text>
21 <FormattedJson json={output} />
22 </VStack>
23 );
24 }
25
26 return <FormattedMessage message={parsed.data} preferJson={preferJson} />;
27};
28
29export default FormattedOutput;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected