Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move the Tools class to the com.openai.tools package #17

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ Custom functions are registered in a `Functions` instance and passed via *tools*

```php
use com\openai\rest\OpenAIEndpoint;
use com\openai\Tools;
use com\openai\tools\Functions;
use com\openai\tools\{Tools, Functions};

$functions= (new Functions())->register('weather', new Weather());

Expand Down
3 changes: 1 addition & 2 deletions src/main/php/com/openai/realtime/RealtimeApi.class.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php namespace com\openai\realtime;

use com\openai\Tools;
use com\openai\tools\Functions;
use com\openai\tools\{Tools, Functions};
use lang\{IllegalStateException, Value};
use text\json\Json;
use util\data\Marshalling;
Expand Down
3 changes: 1 addition & 2 deletions src/main/php/com/openai/rest/RestEndpoint.class.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php namespace com\openai\rest;

use com\openai\Tools;
use com\openai\tools\Functions;
use com\openai\tools\{Tools, Functions};

/** Base class for OpenAI and AzureAI implementations */
abstract class RestEndpoint extends ApiEndpoint {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php namespace com\openai;

use com\openai\tools\Functions;
<?php namespace com\openai\tools;

/**
* Tools
* Tools incorporate the builtins like `code_interpreter` but also custom
* functions declared via `Functions` registry.
*
* @test com.openai.unittest.ToolsTest
* @see https://platform.openai.com/docs/assistants/tools
Expand Down
3 changes: 1 addition & 2 deletions src/test/php/com/openai/unittest/ToolsTest.class.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php namespace com\openai\unittest;

use com\openai\Tools;
use com\openai\realtime\RealtimeApi;
use com\openai\rest\OpenAIEndpoint;
use com\openai\tools\Functions;
use com\openai\tools\{Tools, Functions};
use test\{Assert, Test, Values};
use webservices\rest\TestEndpoint;

Expand Down
Loading