use local GPT4ALL base URI

This commit is contained in:
Thommy Bucaille 2023-12-28 22:58:49 +01:00
parent fa253e11ca
commit 519d4509df
1 changed files with 1 additions and 0 deletions

View File

@ -187,6 +187,7 @@ class ChatController extends BaseController
try {
// self::$client = OpenAI::client(config('chat.key'));
self::$client = OpenAI::factory()
->withBaseUri("http://localhost:4891/v1")
->withApiKey(config('chat.key'))
->withHttpClient($client = new \GuzzleHttp\Client([])) // default: HTTP client found using PSR-18 HTTP Client Discovery
->withHttpHeader('OpenAI-Beta', 'assistants=v1')