Skip to content

Commit 3e8c8d2

Browse files
committed
Release version 0.12.12
1 parent a4346a4 commit 3e8c8d2

File tree

111 files changed

+554
-492
lines changed

Some content is hidden

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

111 files changed

+554
-492
lines changed

bin/publish-ver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fi
1212
VERSION=${VERSION#v}
1313

1414
# Check if release notes exist
15-
NOTES_FILE="docs/release-notes/v$VERSION.md"
15+
NOTES_FILE="docs/release-notes/v$VERSION.mdx"
1616
if [ ! -f "$NOTES_FILE" ]; then
1717
echo "Error: Release notes file not found at $NOTES_FILE"
1818
echo "Please create release notes file before proceeding"

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"psr-4": {
2727
"Cognesy\\Utils\\": "src-utils/",
2828
"Cognesy\\Addons\\": "src-addons/",
29+
"Cognesy\\Http\\": "src-http/",
2930
"Cognesy\\Instructor\\": "src-instructor/",
3031
"Cognesy\\Polyglot\\": "src-polyglot/",
3132
"Cognesy\\Setup\\": "src-setup/"

config/http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
use Cognesy\Polyglot\Http\Enums\HttpClientType;
3+
use Cognesy\Http\Enums\HttpClientType;
44

55
return [
66
'defaultClient' => 'guzzle',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ customize how LLM is instructed to process the input.
1818
<?php
1919
require 'examples/boot.php';
2020

21+
use Cognesy\Http\Events\HttpRequestSent;
2122
use Cognesy\Instructor\Instructor;
22-
use Cognesy\Polyglot\Http\Events\HttpRequestSent;
2323
use Cognesy\Polyglot\LLM\Enums\Mode;
2424

2525
class User {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ is expected to be a JSON object.
1818
<?php
1919
require 'examples/boot.php';
2020

21+
use Cognesy\Http\Events\HttpRequestSent;
2122
use Cognesy\Instructor\Features\Core\Data\Example;
2223
use Cognesy\Instructor\Instructor;
23-
use Cognesy\Polyglot\Http\Events\HttpRequestSent;
2424
use Cognesy\Polyglot\LLM\Enums\Mode;
2525

2626
class User {

docs-build/cookbook/instructor/basics/self_correction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ until results meet the requirements or maxRetries is reached.
1818
<?php
1919
require 'examples/boot.php';
2020

21+
use Cognesy\Http\Events\HttpRequestSent;
2122
use Cognesy\Instructor\Events\Response\ResponseValidated;
2223
use Cognesy\Instructor\Events\Response\ResponseValidationAttempt;
2324
use Cognesy\Instructor\Events\Response\ResponseValidationFailed;
2425
use Cognesy\Instructor\Instructor;
25-
use Cognesy\Polyglot\Http\Events\HttpRequestSent;
2626
use Symfony\Component\Validator\Constraints as Assert;
2727

2828
class UserDetails

docs-build/cookbook/instructor/troubleshooting/on_event.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ and their properties.
2424
<?php
2525
require 'examples/boot.php';
2626

27+
use Cognesy\Http\Events\HttpRequestSent;
28+
use Cognesy\Http\Events\HttpResponseReceived;
2729
use Cognesy\Instructor\Instructor;
28-
use Cognesy\Polyglot\Http\Events\HttpRequestSent;
29-
use Cognesy\Polyglot\Http\Events\HttpResponseReceived;
3030
use Cognesy\Utils\Events\Event;
3131

3232
class User

docs-build/cookbook/polyglot/llm_troubleshooting/http_debug.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ docname: 'http_debug'
55

66
## Overview
77

8-
Instructor PHP provides a way to debug HTTP calls made to LLM APIs via `Debug::setEnabled()` method.
9-
`Debug::setEnabled()` works globally, it turns on dumping all HTTP requests and responses to the console.
8+
Instructor PHP provides a way to debug HTTP calls made to LLM APIs via `withDebug()` method call
9+
on `Inference` object.
10+
11+
When debug mode is turned on all HTTP requests and responses are dumped to the console.
1012

1113
## Example
1214

@@ -15,11 +17,9 @@ Instructor PHP provides a way to debug HTTP calls made to LLM APIs via `Debug::s
1517
require 'examples/boot.php';
1618

1719
use Cognesy\Polyglot\LLM\Inference;
18-
use Cognesy\Utils\Debug\Debug;
19-
20-
Debug::setEnabled();
2120

2221
$response = (new Inference)
22+
->withDebug() // Enable debug mode
2323
->create(
2424
messages: [['role' => 'user', 'content' => 'What is the capital of Brasil']],
2525
options: ['max_tokens' => 128]

docs-build/mint.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
"name": "Polyglot Cookbook",
4848
"url": "cookbook/polyglot",
4949
"group": "LLM Basics"
50+
},
51+
{
52+
"name": "HTTP Client Guide",
53+
"url": "instructor/http",
54+
"group": "HTTP Client Guide"
5055
}
5156
],
5257
"anchors": [
@@ -130,6 +135,23 @@
130135
"instructor/misc/llm_providers"
131136
]
132137
},
138+
{
139+
"group": "Release Notes",
140+
"pages": [
141+
"release-notes/v0.12.12",
142+
"release-notes/v0.12.11",
143+
"release-notes/v0.12.10",
144+
"release-notes/v0.12.9",
145+
"release-notes/v0.12.8",
146+
"release-notes/v0.12.7",
147+
"release-notes/v0.12.6",
148+
"release-notes/v0.12.5",
149+
"release-notes/v0.12.4",
150+
"release-notes/v0.12.3",
151+
"release-notes/v0.12.2",
152+
"release-notes/v0.12.0"
153+
]
154+
},
133155
{
134156
"group": "Polyglot Guide",
135157
"pages": [
@@ -142,6 +164,23 @@
142164
"instructor/polyglot/internals/http"
143165
]
144166
},
167+
{
168+
"group": "HTTP Client Guide",
169+
"pages": [
170+
"instructor/http/1-overview",
171+
"instructor/http/2-getting-started",
172+
"instructor/http/3-making-requests",
173+
"instructor/http/4-handling-responses",
174+
"instructor/http/5-streaming-responses",
175+
"instructor/http/7-changing-client",
176+
"instructor/http/8-changing-client-config",
177+
"instructor/http/9-1-custom-clients",
178+
"instructor/http/9-2-mock-http-driver",
179+
"instructor/http/10-middleware",
180+
"instructor/http/11-processing-with-middleware",
181+
"instructor/http/12-troubleshooting"
182+
]
183+
},
145184
{
146185
"group": "Instructor Hub",
147186
"pages": [

docs/mint.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@
4747
"name": "Polyglot Cookbook",
4848
"url": "cookbook/polyglot",
4949
"group": "LLM Basics"
50+
},
51+
{
52+
"name": "HTTP Client Guide",
53+
"url": "instructor/http",
54+
"group": "HTTP Client Guide"
5055
}
5156
],
5257
"anchors": [
@@ -130,6 +135,23 @@
130135
"instructor/misc/llm_providers"
131136
]
132137
},
138+
{
139+
"group": "Release Notes",
140+
"pages": [
141+
"release-notes/v0.12.12",
142+
"release-notes/v0.12.11",
143+
"release-notes/v0.12.10",
144+
"release-notes/v0.12.9",
145+
"release-notes/v0.12.8",
146+
"release-notes/v0.12.7",
147+
"release-notes/v0.12.6",
148+
"release-notes/v0.12.5",
149+
"release-notes/v0.12.4",
150+
"release-notes/v0.12.3",
151+
"release-notes/v0.12.2",
152+
"release-notes/v0.12.0"
153+
]
154+
},
133155
{
134156
"group": "Polyglot Guide",
135157
"pages": [
@@ -142,6 +164,23 @@
142164
"instructor/polyglot/internals/http"
143165
]
144166
},
167+
{
168+
"group": "HTTP Client Guide",
169+
"pages": [
170+
"instructor/http/1-overview",
171+
"instructor/http/2-getting-started",
172+
"instructor/http/3-making-requests",
173+
"instructor/http/4-handling-responses",
174+
"instructor/http/5-streaming-responses",
175+
"instructor/http/7-changing-client",
176+
"instructor/http/8-changing-client-config",
177+
"instructor/http/9-1-custom-clients",
178+
"instructor/http/9-2-mock-http-driver",
179+
"instructor/http/10-middleware",
180+
"instructor/http/11-processing-with-middleware",
181+
"instructor/http/12-troubleshooting"
182+
]
183+
},
145184
{
146185
"group": "Instructor Hub",
147186
"pages": [

0 commit comments

Comments
 (0)