diff --git a/README.md b/README.md index 5d5057b..257fddd 100644 --- a/README.md +++ b/README.md @@ -348,8 +348,8 @@ $eventDispatcher->addListener(ToolCallsExecuted::class, function (ToolCallsExecu 1. [SerpAPI Tool](examples/toolbox/serpapi.php) 1. [Tavily Tool](examples/toolbox/tavily.php) 1. [Weather Tool with Event Listener](examples/toolbox/weather-event.php) -1. [Wikipedia Tool](examples/anthropic/toolbox.php) -1. [YouTube Transcriber Tool](examples/openai/toolbox.php) (with streaming) +1. [Wikipedia Tool](examples/anthropic/toolcall.php) +1. [YouTube Transcriber Tool](examples/openai/toolcall.php) ### Document Embedding, Vector Stores & Similarity Search (RAG) diff --git a/examples/openai/toolcall.php b/examples/openai/toolcall.php index 2172464..7cb2f32 100644 --- a/examples/openai/toolcall.php +++ b/examples/openai/toolcall.php @@ -28,11 +28,6 @@ $chain = new Chain($platform, $llm, [$processor], [$processor]); $messages = new MessageBag(Message::ofUser('Please summarize this video for me: https://www.youtube.com/watch?v=6uXW-ulpj0s')); -$response = $chain->call($messages, [ - 'stream' => true, // enable streaming of response text -]); +$response = $chain->call($messages); -foreach ($response->getContent() as $word) { - echo $word; -} -echo PHP_EOL; +echo $response->getContent().PHP_EOL;