Spaces:
Configuration error
Configuration error
Update crew.py
Browse files
crew.py
CHANGED
|
@@ -7,17 +7,17 @@ from crewai_tools import (
|
|
| 7 |
WebsiteSearchTool
|
| 8 |
)
|
| 9 |
from google import genai
|
| 10 |
-
from openai import OpenAI
|
| 11 |
from openinference.instrumentation.crewai import CrewAIInstrumentor
|
| 12 |
from phoenix.otel import register
|
| 13 |
from util import get_final_answer
|
| 14 |
|
| 15 |
## LLMs
|
| 16 |
|
| 17 |
-
MANAGER_MODEL = "
|
| 18 |
-
AGENT_MODEL = "
|
| 19 |
|
| 20 |
-
FINAL_ANSWER_MODEL = "
|
| 21 |
|
| 22 |
IMAGE_MODEL = "gemini-2.0-flash"
|
| 23 |
AUDIO_MODEL = "gemini-2.0-flash"
|
|
@@ -87,7 +87,7 @@ def run_crew(question, file_path):
|
|
| 87 |
Raises:
|
| 88 |
RuntimeError: If processing fails"""
|
| 89 |
try:
|
| 90 |
-
client = genai.Client(api_key="GOOGLE_API_KEY")
|
| 91 |
|
| 92 |
file = client.files.upload(file=file_path)
|
| 93 |
|
|
@@ -114,7 +114,7 @@ def run_crew(question, file_path):
|
|
| 114 |
Raises:
|
| 115 |
RuntimeError: If processing fails"""
|
| 116 |
try:
|
| 117 |
-
client = genai.Client(api_key="GOOGLE_API_KEY")
|
| 118 |
|
| 119 |
file = client.files.upload(file=file_path)
|
| 120 |
|
|
@@ -141,7 +141,7 @@ def run_crew(question, file_path):
|
|
| 141 |
Raises:
|
| 142 |
RuntimeError: If processing fails"""
|
| 143 |
try:
|
| 144 |
-
client = genai.Client(api_key="GOOGLE_API_KEY")
|
| 145 |
|
| 146 |
return client.models.generate_content(
|
| 147 |
model=YOUTUBE_MODEL,
|
|
@@ -168,7 +168,7 @@ def run_crew(question, file_path):
|
|
| 168 |
Raises:
|
| 169 |
RuntimeError: If processing fails"""
|
| 170 |
try:
|
| 171 |
-
client = genai.Client(api_key="GOOGLE_API_KEY")
|
| 172 |
|
| 173 |
file = client.files.upload(file=file_path)
|
| 174 |
|
|
|
|
| 7 |
WebsiteSearchTool
|
| 8 |
)
|
| 9 |
from google import genai
|
| 10 |
+
#from openai import OpenAI
|
| 11 |
from openinference.instrumentation.crewai import CrewAIInstrumentor
|
| 12 |
from phoenix.otel import register
|
| 13 |
from util import get_final_answer
|
| 14 |
|
| 15 |
## LLMs
|
| 16 |
|
| 17 |
+
MANAGER_MODEL = "gemini-2.0-flash"
|
| 18 |
+
AGENT_MODEL = "gemini-2.0-flash"
|
| 19 |
|
| 20 |
+
FINAL_ANSWER_MODEL = "gemini-2.0-flash"
|
| 21 |
|
| 22 |
IMAGE_MODEL = "gemini-2.0-flash"
|
| 23 |
AUDIO_MODEL = "gemini-2.0-flash"
|
|
|
|
| 87 |
Raises:
|
| 88 |
RuntimeError: If processing fails"""
|
| 89 |
try:
|
| 90 |
+
client = genai.Client(api_key=os.environ["GOOGLE_API_KEY"])
|
| 91 |
|
| 92 |
file = client.files.upload(file=file_path)
|
| 93 |
|
|
|
|
| 114 |
Raises:
|
| 115 |
RuntimeError: If processing fails"""
|
| 116 |
try:
|
| 117 |
+
client = genai.Client(api_key=os.environ["GOOGLE_API_KEY"])
|
| 118 |
|
| 119 |
file = client.files.upload(file=file_path)
|
| 120 |
|
|
|
|
| 141 |
Raises:
|
| 142 |
RuntimeError: If processing fails"""
|
| 143 |
try:
|
| 144 |
+
client = genai.Client(api_key=os.environ["GOOGLE_API_KEY"])
|
| 145 |
|
| 146 |
return client.models.generate_content(
|
| 147 |
model=YOUTUBE_MODEL,
|
|
|
|
| 168 |
Raises:
|
| 169 |
RuntimeError: If processing fails"""
|
| 170 |
try:
|
| 171 |
+
client = genai.Client(api_key=os.environ["GOOGLE_API_KEY"])
|
| 172 |
|
| 173 |
file = client.files.upload(file=file_path)
|
| 174 |
|