Skip to content

Commit 89b2b80

Browse files
committed
Release version 1.18.3
1 parent a6daff5 commit 89b2b80

File tree

814 files changed

+9010
-2246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

814 files changed

+9010
-2246
lines changed

config/docs.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Documentation Configuration
2+
# This file configures the documentation generation system
3+
4+
# Main docs section - manually curated landing pages
5+
main:
6+
title: 'Instructor for PHP'
7+
source: './docs'
8+
# Files to include in the Main section (relative to source)
9+
# These are the top-level conceptual docs, not package-specific
10+
pages:
11+
- index.md
12+
13+
# Packages - autodiscovered from ./packages/*/docs/
14+
packages:
15+
source_pattern: './packages/*/docs'
16+
# Package descriptions (fallback to composer.json if not specified)
17+
descriptions:
18+
instructor: 'Core structured output extraction library'
19+
polyglot: 'Unified LLM API abstraction layer'
20+
http-client: 'Framework-agnostic HTTP client'
21+
laravel: 'Laravel integration for Instructor'
22+
# Target directory names in output (defaults to package name)
23+
target_dirs:
24+
http-client: 'http'
25+
# Display order (packages not listed here appear alphabetically after)
26+
order:
27+
- instructor
28+
- polyglot
29+
- http-client
30+
- laravel
31+
32+
# Examples / Cookbook
33+
examples:
34+
source: './examples'
35+
intro_pages:
36+
- cookbook/introduction.md
37+
- cookbook/contributing.md
38+
39+
# Release notes / Changelog
40+
changelog:
41+
source: './docs/release-notes'
42+
43+
# Output targets
44+
output:
45+
mintlify:
46+
target: './docs-build'
47+
source_index: './docs/mint.json'
48+
mkdocs:
49+
target: './docs-mkdocs'
50+
template: './docs/mkdocs.yml.template'

docs-build/cookbook/instructor/advanced/config_providers.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Laravel).
1212
## Example
1313

1414
```php
15-
<?php
15+
\<\?php
1616
require 'examples/boot.php';
1717

1818
use Adbar\Dot;

docs-build/cookbook/instructor/advanced/context_cache_structured.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Let's start by defining the data model for the project details and the propertie
2727
that we want to extract or generate based on README file.
2828

2929
```php
30-
<?php
30+
\<\?php
3131
require 'examples/boot.php';
3232

3333
use Cognesy\Instructor\StructuredOutput;
@@ -59,7 +59,7 @@ We read the content of the README.md file and cache the context, so it can be re
5959
multiple requests.
6060

6161
```php
62-
<?php
62+
\<\?php
6363
$content = file_get_contents(__DIR__ . '/../../../README.md');
6464

6565
$cached = (new StructuredOutput)->using('anthropic')->withCachedContext(
@@ -75,7 +75,7 @@ details from the README.md file into the `Project` data model.
7575
Let's start by asking the user to describe the project for a specific audience: P&C insurance CIOs.
7676

7777
```php
78-
<?php
78+
\<\?php
7979
// get StructuredOutputResponse object to get access to usage and other metadata
8080
$response1 = $cached->with(
8181
messages: 'Describe the project in a way compelling to my audience: P&C insurance CIOs.',
@@ -102,7 +102,7 @@ Anthropic API will use the context cached in the previous request to provide the
102102
which results in faster processing and lower costs.
103103

104104
```php
105-
<?php
105+
\<\?php
106106
// get StructuredOutputResponse object to get access to usage and other metadata
107107
$response2 = $cached->with(
108108
messages: "Describe the project in a way compelling to my audience: boutique CMS consulting company owner.",

docs-build/cookbook/instructor/advanced/context_cache_structured_oai.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Let's start by defining the data model for the project details and the propertie
2525
that we want to extract or generate based on README file.
2626

2727
```php
28-
<?php
28+
\<\?php
2929
require 'examples/boot.php';
3030

3131
use Cognesy\Instructor\StructuredOutput;
@@ -57,7 +57,7 @@ We read the content of the README.md file and cache the context, so it can be re
5757
multiple requests.
5858

5959
```php
60-
<?php
60+
\<\?php
6161
$content = file_get_contents(__DIR__ . '/../../../README.md');
6262

6363
$cached = (new StructuredOutput)->using('openai')->withCachedContext(
@@ -73,7 +73,7 @@ details from the README.md file into the `Project` data model.
7373
Let's start by asking the user to describe the project for a specific audience: P&C insurance CIOs.
7474

7575
```php
76-
<?php
76+
\<\?php
7777
// get StructuredOutputResponse object to get access to usage and other metadata
7878
$response1 = $cached->with(
7979
messages: 'Describe the project in a way compelling to my audience: P&C insurance CIOs.',
@@ -100,7 +100,7 @@ OpenAI API can reuse the cached prefix from the previous request to provide the
100100
which results in faster processing and lower costs when prompt caching applies.
101101

102102
```php
103-
<?php
103+
\<\?php
104104
// get StructuredOutputResponse object to get access to usage and other metadata
105105
$response2 = $cached->with(
106106
messages: "Describe the project in a way compelling to my audience: boutique CMS consulting company owner.",

docs-build/cookbook/instructor/advanced/custom_config.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ other LLMs which support OpenAI API.
1212
## Example
1313

1414
```php
15-
<?php
15+
\<\?php
1616
require 'examples/boot.php';
1717

1818
use Cognesy\Config\Env;

docs-build/cookbook/instructor/advanced/custom_http_client.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ docname: 'custom_http_client'
88
## Example
99

1010
```php
11-
<?php
11+
\<\?php
1212
require 'examples/boot.php';
1313

1414
use Cognesy\Events\Dispatchers\SymfonyEventDispatcher;

docs-build/cookbook/instructor/advanced/custom_http_client_laravel.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ docname: 'custom_http_client_laravel'
88
## Example
99

1010
```php
11-
<?php
11+
\<\?php
1212
require 'examples/boot.php';
1313

1414
use Cognesy\Instructor\StructuredOutput;

docs-build/cookbook/instructor/advanced/custom_llm_with_dsn.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ CLI arguments or environment variables.
1212
## Example
1313

1414
```php
15-
<?php
15+
\<\?php
1616
require 'examples/boot.php';
1717

1818
use Cognesy\Instructor\StructuredOutput;

docs-build/cookbook/instructor/advanced/custom_prompts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ customize how LLM is instructed to process the input.
1515
## Example
1616

1717
```php
18-
<?php
18+
\<\?php
1919
require 'examples/boot.php';
2020

2121
use Cognesy\Http\Events\HttpRequestSent;

docs-build/cookbook/instructor/advanced/demonstrations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ is expected to be a JSON object.
1515
## Example
1616

1717
```php
18-
<?php
18+
\<\?php
1919
require 'examples/boot.php';
2020

2121
use Cognesy\Http\Events\HttpRequestSent;

0 commit comments

Comments
 (0)