Update crew.py
Browse files
crew.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
import os
|
| 2 |
-
|
| 3 |
from crewai import Agent, Crew, Process, Task
|
| 4 |
from crewai.tools import tool
|
| 5 |
from crewai_tools import (
|
|
@@ -86,11 +85,11 @@ def run_crew(question, file_path):
|
|
| 86 |
if not os.path.exists(file_path):
|
| 87 |
raise FileNotFoundError(f"Image file not found: {file_path}")
|
| 88 |
|
| 89 |
-
try:
|
| 90 |
-
client = OpenAI()
|
| 91 |
-
|
| 92 |
img_b64 = get_img_b64(file_path)
|
| 93 |
-
|
|
|
|
|
|
|
| 94 |
completion = client.chat.completions.create(
|
| 95 |
messages=[{"role": "user",
|
| 96 |
"content": [{"type": "text",
|
|
|
|
| 1 |
import os
|
|
|
|
| 2 |
from crewai import Agent, Crew, Process, Task
|
| 3 |
from crewai.tools import tool
|
| 4 |
from crewai_tools import (
|
|
|
|
| 85 |
if not os.path.exists(file_path):
|
| 86 |
raise FileNotFoundError(f"Image file not found: {file_path}")
|
| 87 |
|
| 88 |
+
try:
|
|
|
|
|
|
|
| 89 |
img_b64 = get_img_b64(file_path)
|
| 90 |
+
|
| 91 |
+
client = OpenAI()
|
| 92 |
+
|
| 93 |
completion = client.chat.completions.create(
|
| 94 |
messages=[{"role": "user",
|
| 95 |
"content": [{"type": "text",
|