Skip to content

Instantly share code, notes, and snippets.

@usmanjdn93
usmanjdn93 / AssistantController.php
Created May 5, 2024 09:40 — forked from goran-popovic/AssistantController.php
Using Laravel to interact with OpenAI's Assistant API (with Vision) - Basic Example (https://geoligard.com/using-laravel-to-interact-with-openai-s-assistants-api-with-vision)
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use OpenAI\Laravel\Facades\OpenAI;
class AssistantController extends Controller
{
public function generateAssistantsResponse(Request $request)

Install PHP 8.1, node 16 and Docker in Ubuntu.

These scripts can be run with the following commands, by a super user. This installs a lot of stuff, read first.

You can add -s -- --dry-run to then end to do a dry run first.

These are tested on an ec2 instance running vscode remote

Usage

@usmanjdn93
usmanjdn93 / guide.md
Last active December 9, 2020 15:15 — forked from EmadAdly/guide.md
Deploying Laravel app in Amazon Ec2 or Lightsail

1- Creating the Lightsail or EC2 Instance

create a new Lightsail instance or EC2 instance From the AWS Management Console.

2- Connecting to the new instance

Once you create it, download the associated .pem file. you can be downloaded the default SSH key from your account page. we need to move it to the ~/.ssh directory. You can do so by executing

mv ~/Downloads/pemfile.pem ~/.ssh/pemfile.pem