Spaces:
Sleeping
Sleeping
Update app.py
Browse filesdraw route map
app.py
CHANGED
|
@@ -16,10 +16,9 @@ from openai.types import Reasoning
|
|
| 16 |
import requests
|
| 17 |
from urllib.parse import quote
|
| 18 |
from multiprocessing import context
|
| 19 |
-
# from agents.tool import WebSearchTool
|
| 20 |
from typing_extensions import TypedDict, Any
|
| 21 |
-
from agents import Agent, FunctionTool, ImageGenerationTool, RunContextWrapper, Runner, WebSearchTool, function_tool, CodeInterpreterTool, ModelSettings
|
| 22 |
from openai import OpenAI
|
|
|
|
| 23 |
from markdown_pdf import MarkdownPdf
|
| 24 |
from markdown_pdf import Section
|
| 25 |
from docx import Document
|
|
@@ -437,7 +436,7 @@ async def chat(prompt_window, user_window, password, history, output_window,
|
|
| 437 |
|
| 438 |
agent = Agent(name="Assistant",
|
| 439 |
instructions=instructions,
|
| 440 |
-
model_settings=ModelSettings(reasoning=Reasoning(effort='
|
| 441 |
tools=[get_distance, WebSearchTool(), get_news, make_pdf, google_route, # search_web
|
| 442 |
CodeInterpreterTool(tool_config={"type": "code_interpreter","container": code_container}), # make_pdf,
|
| 443 |
ImageGenerationTool(tool_config={"type": "image_generation", "quality": "low"},)],)
|
|
|
|
| 16 |
import requests
|
| 17 |
from urllib.parse import quote
|
| 18 |
from multiprocessing import context
|
|
|
|
| 19 |
from typing_extensions import TypedDict, Any
|
|
|
|
| 20 |
from openai import OpenAI
|
| 21 |
+
from agents import Agent, FunctionTool, ImageGenerationTool, RunContextWrapper, Runner, WebSearchTool, function_tool, CodeInterpreterTool, ModelSettings
|
| 22 |
from markdown_pdf import MarkdownPdf
|
| 23 |
from markdown_pdf import Section
|
| 24 |
from docx import Document
|
|
|
|
| 436 |
|
| 437 |
agent = Agent(name="Assistant",
|
| 438 |
instructions=instructions,
|
| 439 |
+
model_settings=ModelSettings(reasoning=Reasoning(effort='medium', summary='detailed')),
|
| 440 |
tools=[get_distance, WebSearchTool(), get_news, make_pdf, google_route, # search_web
|
| 441 |
CodeInterpreterTool(tool_config={"type": "code_interpreter","container": code_container}), # make_pdf,
|
| 442 |
ImageGenerationTool(tool_config={"type": "image_generation", "quality": "low"},)],)
|