Wire up Valyu Answer (search-grounded answers) with the TypeScript SDK.
Basic usage
Common patterns
Structured output
Pass a JSON schema tostructuredOutput and response.contents comes back as a structured object instead of a string. Detect it with typeof response.contents === "object":
Streaming
Setstreaming: true to receive the answer progressively as an async generator of typed chunks:
Reference
Parameters
Parameters
query (string, required) - the question to answer.Response format
Response format

