Compare commits

..

2 Commits

Author SHA1 Message Date
c053a5676d Turn on web search for RAG
All checks were successful
release / docker (push) Successful in 22s
2025-11-30 13:56:30 +03:00
80ddee9378 Use openrouter instead of vanilla openai 2025-11-30 13:56:11 +03:00
2 changed files with 12 additions and 2 deletions

View File

@ -85,8 +85,12 @@ async def next_vacancy(update: Update, context: ContextTypes.DEFAULT_TYPE):
async def prompt(update: Update, context: ContextTypes.DEFAULT_TYPE): async def prompt(update: Update, context: ContextTypes.DEFAULT_TYPE):
async with AsyncPostgresSaver.from_conn_string(DB_URI) as checkpointer: async with AsyncPostgresSaver.from_conn_string(DB_URI) as checkpointer:
chat_model = ChatOpenAI(
model_name="openai/gpt-5-mini:online",
openai_api_base="https://openrouter.ai/api/v1",
)
agent = create_agent( agent = create_agent(
model=ChatOpenAI(model_name="gpt-5-mini", reasoning_effort="minimal"), model=chat_model,
tools=[get_user_resume], tools=[get_user_resume],
system_prompt=SYSTEM_PROMPT, system_prompt=SYSTEM_PROMPT,
checkpointer=checkpointer, checkpointer=checkpointer,

View File

@ -46,7 +46,13 @@ class Command(BaseCommand):
company_name: str company_name: str
requirements: str requirements: str
openai_client = ChatOpenAI(model_name="gpt-5-mini", temperature=0, seed=42, top_p=1) openai_client = ChatOpenAI(
model_name="openai/gpt-5-mini",
openai_api_base="https://openrouter.ai/api/v1",
temperature=0,
seed=42,
top_p=1,
)
structured_llm = openai_client.with_structured_output(Structure) structured_llm = openai_client.with_structured_output(Structure)
last_timestamp = timezone.now() - timedelta(days=30) last_timestamp = timezone.now() - timedelta(days=30)