Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/2_frameworks/1_react_rag/langfuse_gradio.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import asyncio
import contextlib
import logging
import signal
import sys

Expand All @@ -22,15 +21,15 @@
get_weaviate_async_client,
oai_agent_stream_to_gradio_messages,
pretty_print,
set_up_logging,
setup_langfuse_tracer,
)
from src.utils.langfuse.shared_client import langfuse_client


load_dotenv(verbose=True)


logging.basicConfig(level=logging.INFO)
set_up_logging()

AGENT_LLM_NAME = "gemini-2.5-flash"

Expand Down
12 changes: 5 additions & 7 deletions src/2_frameworks/2_multi_agent/efficient.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import asyncio
import contextlib
import logging
import signal
import sys

Expand All @@ -24,16 +23,15 @@
Configs,
get_weaviate_async_client,
oai_agent_stream_to_gradio_messages,
set_up_logging,
setup_langfuse_tracer,
)
from src.utils.langfuse.shared_client import langfuse_client


load_dotenv(verbose=True)


logging.basicConfig(level=logging.INFO)

set_up_logging()

AGENT_LLM_NAMES = {
"worker": "gemini-2.5-flash", # less expensive,
Expand Down Expand Up @@ -75,15 +73,15 @@ def _handle_sigint(signum: int, frame: object) -> None:
name="SearchAgent",
instructions=(
"You are a search agent. You receive a single search query as input. "
"Use the WebSearchTool to perform a web search, then produce a concise "
"Use the search tool to perform a search, then produce a concise "
"'search summary' of the key findings. Do NOT return raw search results."
),
tools=[
agents.function_tool(async_knowledgebase.search_knowledgebase),
],
# a faster, smaller model for quick searches
model=agents.OpenAIChatCompletionsModel(
model="gemini-2.5-flash", openai_client=async_openai_client
model=AGENT_LLM_NAMES["worker"], openai_client=async_openai_client
),
)

Expand All @@ -101,7 +99,7 @@ def _handle_sigint(signum: int, frame: object) -> None:
],
# a larger, more capable model for planning and reasoning over summaries
model=agents.OpenAIChatCompletionsModel(
model="gemini-2.5-pro", openai_client=async_openai_client
model=AGENT_LLM_NAMES["planner"], openai_client=async_openai_client
),
)

Expand Down
5 changes: 2 additions & 3 deletions src/2_frameworks/3_code_interpreter/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
You will need your E2B API Key.
"""

import logging
from pathlib import Path

import agents
Expand All @@ -18,15 +17,15 @@
CodeInterpreter,
oai_agent_stream_to_gradio_messages,
pretty_print,
set_up_logging,
setup_langfuse_tracer,
)
from src.utils.langfuse.shared_client import langfuse_client


load_dotenv(verbose=True)


logging.basicConfig(level=logging.INFO)
set_up_logging()

CODE_INTERPRETER_INSTRUCTIONS = """\
The `code_interpreter` tool executes Python commands. \
Expand Down