-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Config Instructor for Predict module via constructor
- Loading branch information
1 parent
358dc13
commit 98741d8
Showing
12 changed files
with
123 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace Cognesy\Instructor\Extras\Module\CallData\Traits; | ||
|
||
trait AutoSignature | ||
{ | ||
use CallDataClass\HandlesInputOutputData; | ||
use CallDataClass\ProvidesSchema; | ||
use CallDataClass\ProvidesSignature; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/Extras/Module/CallData/Traits/CallData/ProvidesSchema.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Cognesy\Instructor\Extras\Module\CallData\Traits\CallData; | ||
|
||
use Cognesy\Instructor\Schema\Data\Schema\Schema; | ||
|
||
trait ProvidesSchema | ||
{ | ||
use ProvidesSignature; | ||
|
||
public function toSchema(): Schema { | ||
return $this->toOutputSchema(); | ||
} | ||
|
||
public function toInputSchema(): Schema { | ||
return $this->signature()->toInputSchema(); | ||
} | ||
|
||
public function toOutputSchema(): Schema { | ||
return $this->signature()->toOutputSchema(); | ||
} | ||
|
||
public function inputNames(): array { | ||
return $this->toInputSchema()->getPropertyNames(); | ||
} | ||
|
||
public function outputNames(): array { | ||
return $this->toOutputSchema()->getPropertyNames(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
src/Extras/Module/CallData/Traits/CallDataClass/HandlesSchema.php
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
src/Extras/Module/CallData/Traits/CallDataClass/ProvidesSchema.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace Cognesy\Instructor\Extras\Module\CallData\Traits\CallDataClass; | ||
|
||
use Cognesy\Instructor\Schema\Data\Schema\Schema; | ||
|
||
trait ProvidesSchema | ||
{ | ||
use ProvidesSignature; | ||
|
||
public function toSchema(): Schema { | ||
return $this->toOutputSchema(); | ||
} | ||
|
||
public function toInputSchema(): Schema { | ||
return $this->signature()->toInputSchema(); | ||
} | ||
|
||
public function toOutputSchema(): Schema { | ||
return $this->signature()->toOutputSchema(); | ||
} | ||
|
||
public function inputNames(): array { | ||
return $this->toInputSchema()->getPropertyNames(); | ||
} | ||
|
||
public function outputNames(): array { | ||
return $this->toOutputSchema()->getPropertyNames(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters