Skip to content

Commit

Permalink
Refactor base
Browse files Browse the repository at this point in the history
  • Loading branch information
ihumaunkabir committed Oct 5, 2024
1 parent e678bc3 commit 9f02831
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion handler/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import requests
from config.config import APIURL, VLLM, BEARER


def handle_resp(text: str) -> str:
headers = {"Authorization": BEARER}
respurl = requests.post(APIURL, timeout=120,headers=headers, data=json.dumps({"stream":False,"prompt": text,"model":VLLM, "temperature":0.4}))
Expand Down
1 change: 0 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from src.processchat import handle_message, process_file, process_image
from telegram.ext import Application, CommandHandler, MessageHandler, filters # type: ignore


if __name__ == '__main__':
print('Bot started...')
app = Application.builder().token(BOT_TOKEN).build()
Expand Down
1 change: 0 additions & 1 deletion src/processchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from telegram import Update # type: ignore
from telegram.ext import ContextTypes # type: ignore


async def handle_message(update: Update, context: ContextTypes.DEFAULT_TYPE):
message_type: str = update.message.chat.type
text: str = update.message.text
Expand Down
1 change: 0 additions & 1 deletion utilities/errorhandler.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from telegram import Update
from telegram.ext import ContextTypes


async def error(update: Update, context: ContextTypes.DEFAULT_TYPE):
print(f'Update {update} cause error {context.error}')

0 comments on commit 9f02831

Please sign in to comment.