Skip to content

Commit

Permalink
this will start to make just chat work with tools then we can limit t…
Browse files Browse the repository at this point in the history
…he open area to the tools below
  • Loading branch information
alnutile committed Aug 4, 2024
1 parent 4dbe5c1 commit 7b88793
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 15 deletions.
1 change: 1 addition & 0 deletions Modules/LlmDriver/app/BaseClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public function modifyPayload(array $payload, bool $noTools = false): array
}

put_fixture('ollama_modified_payload.json', $payload);

return $payload;
}

Expand Down
2 changes: 0 additions & 2 deletions Modules/LlmDriver/app/LlmDriverClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace LlmLaraHub\LlmDriver;

use LlmLaraHub\LlmDriver\Functions\FunctionDto;

class LlmDriverClient
{
protected $drivers = [];
Expand Down
2 changes: 1 addition & 1 deletion Modules/LlmDriver/app/OllamaClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Illuminate\Http\Client\Pool;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
use Laravel\Pennant\Feature;
use LlmLaraHub\LlmDriver\Requests\MessageInDto;
use LlmLaraHub\LlmDriver\Responses\CompletionResponse;
Expand Down Expand Up @@ -200,6 +199,7 @@ public function completion(string $prompt): CompletionResponse
}

put_fixture('ollama_completion.json', $response->json());

return OllamaCompletionResponse::from($response->json());
}

Expand Down
4 changes: 0 additions & 4 deletions app/Jobs/SummarizeDocumentJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

namespace App\Jobs;

use App\Domains\Agents\VerifyPromptInputDto;
use App\Domains\Agents\VerifyPromptOutputDto;
use App\Domains\Documents\StatusEnum;
use App\Domains\Prompts\SummarizeDocumentPrompt;
use App\Models\Document;
use Facades\App\Domains\Agents\VerifyResponseAgent;
use Facades\App\Domains\Tokenizer\Templatizer;
use Illuminate\Bus\Batchable;
use Illuminate\Bus\Queueable;
Expand All @@ -16,7 +13,6 @@
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;
use Laravel\Pennant\Feature;
use LlmLaraHub\LlmDriver\LlmDriverFacade;
use LlmLaraHub\LlmDriver\Responses\CompletionResponse;

Expand Down
6 changes: 1 addition & 5 deletions app/Models/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
use App\Domains\Chat\MetaDataDto;
use App\Domains\Chat\ToolsDto;
use App\Domains\Messages\RoleEnum;
use Facades\App\Domains\Orchestration\OrchestrateVersionTwo;
use App\Events\ChatUiUpdateEvent;
use App\Events\MessageCreatedEvent;
use App\Jobs\OrchestrateJob;
use App\Jobs\SimpleRetrieveRelatedOrchestrateJob;
use Facades\App\Domains\Orchestration\OrchestrateVersionTwo;
use Facades\App\Domains\Tokenizer\Templatizer;
use Illuminate\Bus\Batch;
use Illuminate\Database\Eloquent\Factories\HasFactory;
Expand All @@ -18,10 +16,8 @@
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Support\Facades\Bus;
use Illuminate\Support\Facades\Log;
use LlmLaraHub\LlmDriver\HasDrivers;
use LlmLaraHub\LlmDriver\HasDriversTrait;
use LlmLaraHub\LlmDriver\LlmDriverFacade;

class Message extends Model implements HasDrivers
{
Expand Down
1 change: 0 additions & 1 deletion tests/Feature/OllamaChatCompletionResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Illuminate\Support\Arr;
use LlmLaraHub\LlmDriver\Responses\OllamaChatCompletionResponse;
use LlmLaraHub\LlmDriver\Responses\OllamaCompletionResponse;
use LlmLaraHub\LlmDriver\Responses\OllamaToolDto;
use Tests\TestCase;

Expand Down
2 changes: 0 additions & 2 deletions tests/Feature/OllamaCompletionResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

namespace Tests\Feature;

use Illuminate\Support\Arr;
use LlmLaraHub\LlmDriver\Responses\OllamaCompletionResponse;
use LlmLaraHub\LlmDriver\Responses\OllamaToolDto;
use Tests\TestCase;

class OllamaCompletionResponseTest extends TestCase
Expand Down

0 comments on commit 7b88793

Please sign in to comment.