-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from LlmLaraHub/modules
Start moving all the core stuff into Modules
- Loading branch information
Showing
200 changed files
with
14,208 additions
and
156 deletions.
There are no files selected for viewing
Binary file not shown.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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,11 @@ | ||
{ | ||
"name": "Foundation", | ||
"alias": "foundation", | ||
"description": "", | ||
"keywords": [], | ||
"priority": 0, | ||
"providers": [ | ||
|
||
], | ||
"files": [] | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
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
8 changes: 4 additions & 4 deletions
8
app/LlmDriver/BaseClient.php → Modules/LlmDriver/app/BaseClient.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
8 changes: 4 additions & 4 deletions
8
app/LlmDriver/ClaudeClient.php → Modules/LlmDriver/app/ClaudeClient.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
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/DriversEnum.php → Modules/LlmDriver/app/DriversEnum.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace App\LlmDriver; | ||
namespace LlmLaraHub\LlmDriver; | ||
|
||
enum DriversEnum: string | ||
{ | ||
|
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/Functions/ArgumentCaster.php → ...lmDriver/app/Functions/ArgumentCaster.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
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/Functions/FunctionCallDto.php → ...mDriver/app/Functions/FunctionCallDto.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
6 changes: 3 additions & 3 deletions
6
app/LlmDriver/Functions/FunctionContract.php → ...Driver/app/Functions/FunctionContract.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
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/Functions/FunctionDto.php → ...s/LlmDriver/app/Functions/FunctionDto.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
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/Functions/ParametersDto.php → ...LlmDriver/app/Functions/ParametersDto.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
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/Functions/PropertyDto.php → ...s/LlmDriver/app/Functions/PropertyDto.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
4 changes: 2 additions & 2 deletions
4
...lmDriver/Functions/SearchAndSummarize.php → ...iver/app/Functions/SearchAndSummarize.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
8 changes: 4 additions & 4 deletions
8
...mDriver/Functions/SummarizeCollection.php → ...ver/app/Functions/SummarizeCollection.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
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/HasDrivers.php → Modules/LlmDriver/app/HasDrivers.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace App\LlmDriver; | ||
namespace LlmLaraHub\LlmDriver; | ||
|
||
interface HasDrivers | ||
{ | ||
|
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,32 @@ | ||
<?php | ||
|
||
namespace LlmLaraHub\LlmDriver\Helpers; | ||
|
||
use Illuminate\Queue\Middleware\WithoutOverlapping; | ||
use LlmLaraHub\LlmDriver\HasDrivers; | ||
use LlmLaraHub\LlmDriver\LlmDriverFacade; | ||
|
||
trait JobMiddlewareTrait | ||
{ | ||
public function driverMiddleware(HasDrivers $hasDrivers): array | ||
{ | ||
$defaults = []; | ||
|
||
/** | ||
* @NOTE | ||
* basically Ollama can only handle one job | ||
* at a time from what I can tell right now. | ||
* So this prevents to many jobs hitting | ||
* it at once | ||
*/ | ||
if (LlmDriverFacade::driver($hasDrivers->getDriver())->isAsync()) { | ||
return $defaults; | ||
} | ||
|
||
return [ | ||
(new WithoutOverlapping($hasDrivers->getDriver())) | ||
->releaseAfter(30) | ||
->expireAfter(600), | ||
]; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/Helpers/TrimText.php → Modules/LlmDriver/app/Helpers/TrimText.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
Empty file.
4 changes: 2 additions & 2 deletions
4
app/LlmDriver/LlmDriverClient.php → Modules/LlmDriver/app/LlmDriverClient.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
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/LlmDriverFacade.php → Modules/LlmDriver/app/LlmDriverFacade.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace App\LlmDriver; | ||
namespace LlmLaraHub\LlmDriver; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
|
||
|
6 changes: 3 additions & 3 deletions
6
app/LlmDriver/LlmServiceProvider.php → Modules/LlmDriver/app/LlmServiceProvider.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
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/MockClient.php → Modules/LlmDriver/app/MockClient.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace App\LlmDriver; | ||
namespace LlmLaraHub\LlmDriver; | ||
|
||
class MockClient extends BaseClient | ||
{ | ||
|
8 changes: 4 additions & 4 deletions
8
app/LlmDriver/OllamaClient.php → Modules/LlmDriver/app/OllamaClient.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
8 changes: 4 additions & 4 deletions
8
app/LlmDriver/OpenAiClient.php → Modules/LlmDriver/app/OpenAiClient.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
8 changes: 4 additions & 4 deletions
8
app/LlmDriver/Orchestrate.php → Modules/LlmDriver/app/Orchestrate.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
Empty file.
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/Requests/MessageInDto.php → ...s/LlmDriver/app/Requests/MessageInDto.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace App\LlmDriver\Requests; | ||
namespace LlmLaraHub\LlmDriver\Requests; | ||
|
||
use Spatie\LaravelData\Data; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...lmDriver/Responses/CompletionResponse.php → ...iver/app/Responses/CompletionResponse.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
2 changes: 1 addition & 1 deletion
2
...river/Responses/EmbeddingsResponseDto.php → ...r/app/Responses/EmbeddingsResponseDto.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
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/Responses/FunctionResponse.php → ...Driver/app/Responses/FunctionResponse.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace App\LlmDriver\Responses; | ||
namespace LlmLaraHub\LlmDriver\Responses; | ||
|
||
/** | ||
* @NOTE | ||
|
2 changes: 1 addition & 1 deletion
2
app/LlmDriver/Responses/VectorCaster.php → .../LlmDriver/app/Responses/VectorCaster.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
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,28 @@ | ||
{ | ||
"name": "llmlarahub/llmdriver", | ||
"description": "Driver for any LLM", | ||
"authors": [ | ||
{ | ||
"name": "Alfred Nutile", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"extra": { | ||
"laravel": { | ||
"providers": [], | ||
"aliases": { | ||
|
||
} | ||
} | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"LlmLaraHub\\LlmDriver\\": "app/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"LlmLaraHub\\LlmDriver\\Tests\\": "tests/" | ||
} | ||
} | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
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,11 @@ | ||
{ | ||
"name": "LlmDriver", | ||
"alias": "llmdriver", | ||
"description": "", | ||
"keywords": [], | ||
"priority": 0, | ||
"providers": [ | ||
|
||
], | ||
"files": [] | ||
} |
Empty file.
Empty file.
Empty file.
Empty file.
Oops, something went wrong.