Spaces:
Running
Running
Fix typo
Browse files
tool.py
CHANGED
|
@@ -16,8 +16,6 @@ from colpali_engine.models import ColQwen2, ColQwen2Processor
|
|
| 16 |
|
| 17 |
from smolagents import Tool, ChatMessage
|
| 18 |
|
| 19 |
-
from utils import query_openai
|
| 20 |
-
|
| 21 |
from dotenv import load_dotenv
|
| 22 |
load_dotenv()
|
| 23 |
|
|
@@ -91,7 +89,7 @@ def query_openai(query, pages, api_key=None, system_prompt=DEFAULT_SYSTEM_PROMPT
|
|
| 91 |
|
| 92 |
return "Enter your OpenAI API key to get a custom response"
|
| 93 |
|
| 94 |
-
|
| 95 |
"""You are a smart assistant designed to extract context of PDF pages.
|
| 96 |
Give concise answers, only containing info in the pages you are given.
|
| 97 |
You can answer using information contained in plots and figures if necessary."""
|
|
|
|
| 16 |
|
| 17 |
from smolagents import Tool, ChatMessage
|
| 18 |
|
|
|
|
|
|
|
| 19 |
from dotenv import load_dotenv
|
| 20 |
load_dotenv()
|
| 21 |
|
|
|
|
| 89 |
|
| 90 |
return "Enter your OpenAI API key to get a custom response"
|
| 91 |
|
| 92 |
+
CONTEXT_SYSTEM_PROMPT = \
|
| 93 |
"""You are a smart assistant designed to extract context of PDF pages.
|
| 94 |
Give concise answers, only containing info in the pages you are given.
|
| 95 |
You can answer using information contained in plots and figures if necessary."""
|