MCPcopy Index your code
hub / github.com/FlowiseAI/Flowise / formatForLangSmith

Function formatForLangSmith

packages/components/src/handler.test.ts:135–142  ·  view source on GitHub ↗
(usageMetadata: Record<string, any> | undefined)

Source from the content-addressed store, hash-verified

133
134 // Helper to format for LangSmith
135 const formatForLangSmith = (usageMetadata: Record<string, any> | undefined) => {
136 if (!usageMetadata) return undefined
137 return {
138 prompt_tokens: usageMetadata.input_tokens,
139 completion_tokens: usageMetadata.output_tokens,
140 total_tokens: usageMetadata.total_tokens
141 }
142 }
143
144 describe('backward compatibility with string input', () => {
145 it('should handle plain string output', () => {

Callers 1

handler.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected