Skip to content

Commit ba397c6

Browse files
committed
Release version 0.12.2
1 parent 4636ccb commit ba397c6

File tree

288 files changed

+801
-721
lines changed

Some content is hidden

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

288 files changed

+801
-721
lines changed

.gitignore

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,16 @@ Thumbs.db
4242
/tests/_support/_generated/
4343
/coverage/
4444

45-
# User-specific files (temporary, experimental, to be archived / removed)
45+
# Non-distributed files (temporary, experimental, to be archived / removed)
4646
/archived/
47-
/experimental/*
47+
/experimental/
4848
/tmp/
4949
/temp/
50-
/prompts/misc/*
51-
/prompts/archive/*
50+
/prompts/misc/
51+
/prompts/archive/
52+
53+
# Excluding examples, hub, etc to make the library distribution smaller
54+
/examples/
55+
/src-aux/
56+
/src-hub/
57+
/scripts/hub.php

composer.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"Cognesy\\Utils\\": "src-utils/",
2929
"Cognesy\\Addons\\": "src-addons/",
3030
"Cognesy\\Aux\\": "src-aux/",
31-
"Cognesy\\LLM\\": "src-llm/",
31+
"Cognesy\\Polyglot\\": "src-polyglot/",
3232
"Cognesy\\Setup\\": "src-setup/",
3333
"Cognesy\\Tell\\": "src-tell/",
3434
"Cognesy\\InstructorHub\\": "src-hub/"
@@ -81,7 +81,12 @@
8181
"toolkit/cli-utils": "^2.0",
8282
"twig/twig": "^3.0",
8383
"vimeo/psalm": "dev-master",
84-
"webuni/front-matter": "^2.0"
84+
"webuni/front-matter": "^2.0",
85+
"cognesy/aux-tools": "^0.12.2",
86+
"cognesy/tell": "^0.12.2",
87+
"cognesy/instructor-php-hub": "^0.12.2",
88+
"cognesy/instructor-php-setup": "^0.12.2",
89+
"cognesy/experimental": "^0.12.2"
8590
},
8691
"config": {
8792
"allow-plugins": {
@@ -111,7 +116,10 @@
111116
"symfony/type-info": "^7.1",
112117
"symfony/validator": "^6.4 || ^7.0",
113118
"symfony/yaml": "^7.1",
114-
"vlucas/phpdotenv": "^5.6"
119+
"vlucas/phpdotenv": "^5.6",
120+
"cognesy/llm": "^0.12.2",
121+
"cognesy/utils": "^0.12.2",
122+
"cognesy/instructor-php-addons": "^0.12.2"
115123
},
116124
"scripts": {
117125
"tests": "@php vendor/bin/pest",

config/embed.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\LLM\LLM\Enums\LLMProviderType;
3+
use Cognesy\Polyglot\LLM\Enums\LLMProviderType;
44
use Cognesy\Utils\Env;
55

66
return [

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\LLM\Http\Enums\HttpClientType;
3+
use Cognesy\Polyglot\Http\Enums\HttpClientType;
44

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

config/llm.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\LLM\LLM\Enums\LLMProviderType;
3+
use Cognesy\Polyglot\LLM\Enums\LLMProviderType;
44
use Cognesy\Utils\Env;
55

66
return [

docs/advanced/function_calls.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ chatbots or agents.
1212

1313
```php
1414
<?php
15-
use Cognesy\Addons\FunctionCall\FunctionCall;use Cognesy\Instructor\Instructor;
15+
use Cognesy\Addons\FunctionCall\FunctionCall;
16+
use Cognesy\Instructor\Instructor;
1617

1718
/** Save user data to storage */
1819
function saveUser(string $name, int $age, string $country) {
@@ -36,7 +37,8 @@ saveUser(...$args);
3637

3738
```php
3839
<?php
39-
use Cognesy\Addons\FunctionCall\FunctionCall;use Cognesy\Instructor\Instructor;
40+
use Cognesy\Addons\FunctionCall\FunctionCall;
41+
use Cognesy\Instructor\Instructor;
4042

4143
class DataStore {
4244
/** Save user data to storage */
@@ -62,7 +64,8 @@ $args = (new Instructor)->respond(
6264

6365
```php
6466
<?php
65-
use Cognesy\Addons\FunctionCall\FunctionCall;use Cognesy\Instructor\Instructor;
67+
use Cognesy\Addons\FunctionCall\FunctionCall;
68+
use Cognesy\Instructor\Instructor;
6669

6770
/** Save user data to storage */
6871
$callable = function saveUser(string $name, int $age, string $country) {

docs/advanced/model_options.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can pass a custom configured instance of client to the Instructor. This allo
2525
<?php
2626
use Cognesy\Instructor\Features\LLM\Drivers\OpenAIDriver;
2727
use Cognesy\Instructor\Instructor;
28-
use Cognesy\LLM\LLM\Data\LLMConfig;
28+
use Cognesy\Polyglot\LLM\Data\LLMConfig;
2929

3030
// Create instance of OpenAI client initialized with custom parameters
3131
$driver = new OpenAIDriver(new LLMConfig(

docs/advanced/prompts.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ If you need to customize the configuration or set the template content directly,
156156

157157
```php
158158
<?php
159-
use Cognesy\Addons\Prompt\Data\TemplateEngineConfig;use Cognesy\Addons\Prompt\Enums\TemplateEngineType;
159+
use Cognesy\Addons\Prompt\Data\TemplateEngineConfig;
160+
use Cognesy\Addons\Prompt\Enums\TemplateEngineType;
160161

161162
// Setting custom configuration
162163
$config = new TemplateEngineConfig(

docs/cookbook/examples/advanced/context_cache_llm.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ generating its summary for 2 target audiences.
2828
$loader = require 'vendor/autoload.php';
2929
$loader->add('Cognesy\\Instructor\\', __DIR__ . '../../src/');
3030

31-
use Cognesy\LLM\LLM\Inference;
31+
use Cognesy\Polyglot\LLM\Inference;
3232
use Cognesy\Utils\Str;
3333

3434
$data = file_get_contents(__DIR__ . '/../../../README.md');

docs/cookbook/examples/advanced/context_cache_structured.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $loader->add('Cognesy\\Instructor\\', __DIR__ . '../../src/');
3333

3434
use Cognesy\Instructor\Features\Schema\Attributes\Description;
3535
use Cognesy\Instructor\Instructor;
36-
use Cognesy\LLM\LLM\Enums\Mode;
36+
use Cognesy\Polyglot\LLM\Enums\Mode;
3737
use Cognesy\Utils\Str;
3838

3939
class Project {

0 commit comments

Comments
 (0)