Compare commits
12 Commits
jobs/insta
...
6b9b5a60e9
Author | SHA1 | Date | |
---|---|---|---|
6b9b5a60e9 | |||
6d92eb76d8 | |||
fcc78fd560 | |||
a57cbffbeb | |||
4623a52bcc | |||
8ab097ca1c | |||
9d0a1b5cf9 | |||
77fcee7a83 | |||
1f7f4c665d | |||
44d7d52f23 | |||
25b5b1be27 | |||
7054597696 |
@ -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}
|
||||
|
@ -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
|
||||
|
@ -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 \
|
||||
|
@ -99,7 +99,7 @@ class HellcaseJob extends BrowserJob implements ShouldBeUniqueUntilProcessing
|
||||
sleep(5);
|
||||
$browser->waitForText("Sign in with Steam", 30, true);
|
||||
sleep(3);
|
||||
$browser->driver->findElement(WebDriverBy::xpath('//button[contains(@class,"_base_zvftr_1 _accent-1_zvftr_105 _m_zvftr_52 _full_zvftr_94 _primary_zvftr_100")]'))->click();
|
||||
$browser->driver->findElement(WebDriverBy::xpath("//button[. = 'Sign in with Steam']"))->click();
|
||||
sleep(5);
|
||||
|
||||
// QR CODE SCANNING
|
||||
|
@ -171,7 +171,10 @@ class InstagramRepostJob extends BrowserJob implements ShouldBeUniqueUntilProces
|
||||
$downloadInfos
|
||||
];
|
||||
|
||||
$this->describeReel($repost, $downloadInfos);
|
||||
if ($downloadInfos !== null) {
|
||||
$this->describeReel($repost, $downloadInfos);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->jobRun->addArtifact(new JobArtifact([
|
||||
@ -185,6 +188,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);
|
||||
|
@ -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');
|
||||
|
@ -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 '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,8 +39,8 @@ services:
|
||||
|
||||
undetected-chromedriver:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: undetectedChromedriver/seleniumChromedriverDockerfile
|
||||
context: ./undetectedChromedriver
|
||||
dockerfile: seleniumChromedriverDockerfile
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- /tmp:/tmp
|
||||
|
Reference in New Issue
Block a user