Agent#streamは再走査可能なStreamResultを返します。
reasoning_stream、item_stream、またはfull_streamを使います。Rubyはプロバイダーのストリームを同期的に読み取り、その後、ほかのコンシューマーが再走査できるシーケンスを公開します。
項目値は現在ハッシュであり、TypeScriptの判別可能な項目ユニオンではありません。
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Rubyエージェントのテキスト、推論、項目、ライフサイクルの各ストリームを利用します。
Agent#streamは再走査可能なStreamResultを返します。
stream = agent.stream(input: "Research this topic", client: client)
stream.text_stream.each { |delta| print delta }
completed = stream.result
reasoning_stream、item_stream、またはfull_streamを使います。Rubyはプロバイダーのストリームを同期的に読み取り、その後、ほかのコンシューマーが再走査できるシーケンスを公開します。
項目値は現在ハッシュであり、TypeScriptの判別可能な項目ユニオンではありません。