10 Commits

Author SHA1 Message Date
fcc78fd560 fix tesseract
All checks were successful
Push image to registry / build-image (push) Successful in 4m44s
2025-07-01 11:57:51 +02:00
a57cbffbeb Add LLM env variables 2025-07-01 11:29:35 +02:00
4623a52bcc Fix tesseract dependencies
All checks were successful
Push image to registry / build-image (push) Successful in 4m55s
2025-07-01 11:09:14 +02:00
8ab097ca1c Install Tesseract dependencies
Some checks failed
Push image to registry / build-image (push) Failing after 39s
2025-07-01 11:08:20 +02:00
9d0a1b5cf9 Fix
All checks were successful
Push image to registry / build-image (push) Successful in 6m51s
2025-06-30 16:33:07 +02:00
77fcee7a83 Fix ?
Some checks failed
Push image to registry / build-image (push) Failing after 42s
2025-06-30 16:29:41 +02:00
1f7f4c665d Fix composer version
Some checks failed
Push image to registry / build-image (push) Failing after 44s
2025-06-30 16:24:09 +02:00
44d7d52f23 fix composer version 2025-06-30 16:23:47 +02:00
25b5b1be27 Merge branch 'jobs/instagram-repost/ai-description'
Some checks failed
Push image to registry / build-image (push) Failing after 1m23s
2025-06-30 16:14:57 +02:00
7054597696 Fix non downloaded videos
All checks were successful
Push image to registry / build-image (push) Successful in 4m56s
2025-06-09 18:30:38 +02:00
7 changed files with 37 additions and 10 deletions

View File

@ -81,3 +81,11 @@ VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
# AI LLM
LLM_API_HOST_URL=${LLM_API_HOST_URL}
LLM_API_TOKEN=${LLM_API_TOKEN}
LLM_CHAT_MODEL=${LLM_CHAT_MODEL}
LLM_CHAT_MODEL_THINK=${LLM_CHAT_MODEL_THINK}
LLM_VISION_MODEL=${LLM_VISION_MODEL}
LLM_VISION_MODEL_THINK=${LLM_VISION_MODEL_THINK}

View File

@ -83,6 +83,9 @@ VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
# AI LLM
LLM_HOST_URL="https://openai.com/api"
LLM_CHAT_MODEL="gpt-4o"
LLM_VISION_MODEL="gpt-4o-vision-preview"
LLM_API_HOST_URL="https://chat.myopen-webui.dev/ollama"
LLM_API_TOKEN="myopen-webui-token-1234567890abcdef" # Replace with your actual token
LLM_CHAT_MODEL="deepseek-r1:8b"
LLM_CHAT_MODEL_THINK=true
LLM_VISION_MODEL="llava:7b"
LLM_VISION_MODEL_THINK=false

View File

@ -1,6 +1,6 @@
# INSTALL PHP COMPOSER DEPENDENCIES
FROM composer:lts AS composer-deps
FROM composer:2.7.9 AS composer-deps
WORKDIR /
@ -61,6 +61,11 @@ RUN apk update && apk add --no-cache \
RUN docker-php-ext-configure zip && docker-php-ext-install zip
RUN docker-php-ext-install gd pdo pdo_mysql zip
# Tesseract-OCR module downloads
# Based on https://github.com/Franky1/docker-tesseract/blob/master/Dockerfile.main
RUN wget --no-check-certificate https://github.com/tesseract-ocr/tessdata/raw/refs/heads/main/eng.traineddata -P /usr/share/tessdata \
&& wget --no-check-certificate https://github.com/tesseract-ocr/tessdata/raw/refs/heads/main/fra.traineddata -P /usr/share/tessdata
# Install latest version of the linux binary of yt-dlp into /bin/yt-dlp
# Get the file from https://github.com/yt-dlp/yt-dlp-master-builds/releases/latest/download/yt-dlp
RUN curl -L https://github.com/yt-dlp/yt-dlp-master-builds/releases/latest/download/yt-dlp -o /bin/yt-dlp \

View File

@ -185,6 +185,10 @@ class InstagramRepostJob extends BrowserJob implements ShouldBeUniqueUntilProces
$reel = $infos[0];
$videoInfo = $infos[1];
if ($videoInfo === null) {
continue; // Skip this reel if it failed to download
}
$repostSuccess = false;
do {
$repostSuccess = $this->repostReel($browser, $reel, $videoInfo);

View File

@ -9,10 +9,11 @@ use Uri;
*/
class OpenAPIPrompt implements IAIPrompt
{
private string $host;
private ?string $host;
private ?string $token = null;
public function __construct(string $host = null) {
public function __construct(?string $host = null) {
//dd($host ?? config('llm.api.host'));
$this->host = $host ?? config('llm.api.host');
if (config('llm.api.token')) {
$this->token = config('llm.api.token');

View File

@ -9,7 +9,13 @@ class TesseractImageOCR implements IImageOCR
* @inheritDoc
*/
public function performOCR(string $filePath): string {
$tesseract = new TesseractOCR($filePath);
return $tesseract->run();
try {
$tesseract = new TesseractOCR($filePath);
return $tesseract->run();
} catch (\Exception $e) {
// Handle the exception, log it, or rethrow it as needed
// For now, we just return an empty string
return '';
}
}
}

View File

@ -39,8 +39,8 @@ services:
undetected-chromedriver:
build:
context: .
dockerfile: undetectedChromedriver/seleniumChromedriverDockerfile
context: ./undetectedChromedriver
dockerfile: seleniumChromedriverDockerfile
restart: unless-stopped
volumes:
- /tmp:/tmp