added chromium and new bot tokens
This commit is contained in:
parent
b27700ae5c
commit
5c5136be7c
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -29,11 +29,11 @@
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/agent-py-bot/agent.py",
|
||||
"console": "integratedTerminal",
|
||||
"preLaunchTask": "activate-venv", // Custom task to activate venv and run Docker
|
||||
"python": "/venv/bin/python", // Path to the Python interpreter in your venv
|
||||
"env": {
|
||||
"PYTHONUNBUFFERED": "1"
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
@ -76,11 +76,13 @@ EXPOSE 8080 8081
|
||||
RUN apk add --no-cache python3 py3-pip
|
||||
# If you need Python to be the default version, make a symbolic link to python3
|
||||
RUN if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python; fi
|
||||
# Ensure pip is up to date
|
||||
#RUN python -m ensurepip --upgrade
|
||||
|
||||
# Install Chromium and Chromium WebDriver # comment to reduce the deployment image size
|
||||
RUN apk add --no-cache chromium chromium-chromedriver
|
||||
|
||||
# Create a virtual environment and activate it
|
||||
RUN python3 -m venv /venv
|
||||
RUN . /venv/bin/activate && pip install -r agent-py-bot/requirements.txt
|
||||
RUN . /venv/bin/activate && pip install --upgrade pip && pip install -r agent-py-bot/requirements.txt
|
||||
|
||||
#RUN chown -R node /app
|
||||
#USER node
|
||||
|
@ -1,5 +1,7 @@
|
||||
import logging
|
||||
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
|
||||
from telegram.ext import Updater, CommandHandler, MessageHandler, filters, CallbackContext
|
||||
|
||||
|
||||
import requests
|
||||
import json
|
||||
import base64
|
||||
@ -13,10 +15,13 @@ logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Telegram Bot Token
|
||||
TOKEN = 'YOUR_TELEGRAM_BOT_TOKEN_HERE'
|
||||
# t.me/kevin_ai_robot
|
||||
TOKEN = '6805059978:AAHNJKuOeazMSJHc3-BXRCsFfEVyFHeFnjw'
|
||||
# t.me/artitherobot 6749075936:AAHUHiPTDEIu6JH7S2fQdibwsu6JVG3FNG0
|
||||
|
||||
|
||||
# LLM API Endpoint
|
||||
LLM_ENDPOINT = "http://localhost:11434/api/chat"
|
||||
LLM_ENDPOINT = "http://192.168.0.11:11434/api/chat"
|
||||
|
||||
# Selenium WebDriver setup for screenshots
|
||||
chrome_options = Options()
|
||||
@ -25,7 +30,7 @@ driver = webdriver.Chrome(options=chrome_options)
|
||||
|
||||
def start(update, context):
|
||||
"""Send a message when the command /start is issued."""
|
||||
update.message.reply_text('Hi! Send me a message, and I will interact with LLM.')
|
||||
update.message.reply_text('Hi I am ! Send me a message, and I will interact with LLM.')
|
||||
|
||||
def echo(update, context):
|
||||
"""Echo the user message."""
|
||||
|
@ -6,6 +6,8 @@
|
||||
pip install python-telegram-bot requests selenium Pillow
|
||||
|
||||
|
||||
pip freeze > requirements.txt
|
||||
|
||||
pip install ....
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user