diff --git a/docs/cookbook/examples/advanced/context_cache.mdx b/docs/cookbook/examples/advanced/context_cache.mdx index aafaf38d..2547f404 100644 --- a/docs/cookbook/examples/advanced/context_cache.mdx +++ b/docs/cookbook/examples/advanced/context_cache.mdx @@ -83,9 +83,7 @@ Let's start by asking the user to describe the project for a specific audience: ```php respond( - messages: [ - ['role' => 'user', 'content' => 'Describe the project - my audience is P&C insurance CIOs'], - ], + messages: 'Describe the project - my audience is P&C insurance CIOs', mode: Mode::Json, responseModel: Project::class, options: ['max_tokens' => 4096], @@ -102,9 +100,7 @@ which results in faster processing and lower costs. ```php respond( - messages: [ - ['role' => 'user', 'content' => 'Describe the project - my audience is boutique CMS consulting company owner'], - ], + messages: 'Describe the project - my audience is boutique CMS consulting company owner', mode: Mode::Json, responseModel: Project::class, options: ['max_tokens' => 4096], diff --git a/examples/02_Advanced/ContextCaching/run.php b/examples/02_Advanced/ContextCaching/run.php index aafaf38d..2547f404 100644 --- a/examples/02_Advanced/ContextCaching/run.php +++ b/examples/02_Advanced/ContextCaching/run.php @@ -83,9 +83,7 @@ class Project { ```php respond( - messages: [ - ['role' => 'user', 'content' => 'Describe the project - my audience is P&C insurance CIOs'], - ], + messages: 'Describe the project - my audience is P&C insurance CIOs', mode: Mode::Json, responseModel: Project::class, options: ['max_tokens' => 4096], @@ -102,9 +100,7 @@ class Project { ```php respond( - messages: [ - ['role' => 'user', 'content' => 'Describe the project - my audience is boutique CMS consulting company owner'], - ], + messages: 'Describe the project - my audience is boutique CMS consulting company owner', mode: Mode::Json, responseModel: Project::class, options: ['max_tokens' => 4096],