chore: Roo Code szabályok, módok és MCP szerverek konfigurálása a Masterbook alapján
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# /opt/docker/dev/service_finder/backend/app/workers/ocr_robot.py
|
||||
# /opt/docker/dev/service_finder/backend/app/workers/ocr/robot_1_ocr_processor.py
|
||||
import asyncio
|
||||
import os
|
||||
import logging
|
||||
@@ -71,13 +71,16 @@ class OCRRobot:
|
||||
|
||||
with open(temp_path, "rb") as f:
|
||||
image_bytes = f.read()
|
||||
|
||||
# 1. Kép kódolása Base64 formátumba (A Vision modellek ezt várják)
|
||||
import base64
|
||||
base64_image = base64.b64encode(image_bytes).decode('utf-8')
|
||||
|
||||
# AI felismerés (pl. Llama-Vision vagy GPT-4o)
|
||||
ocr_result = await AIService.get_clean_vehicle_data(
|
||||
make="OCR_SCAN",
|
||||
raw_model=doc.parent_type,
|
||||
v_type="document",
|
||||
sources={"image_data": "raw_scan"}
|
||||
# 2. A MEGFELELŐ AI HÍVÁS (Vision modell hívása az AIService-en keresztül)
|
||||
doc_type_str = doc.doc_type or "general_document"
|
||||
ocr_result = await AIService.process_ocr_document(
|
||||
doc_type=doc_type_str,
|
||||
base64_image=base64_image
|
||||
)
|
||||
|
||||
if ocr_result:
|
||||
|
||||
Reference in New Issue
Block a user