Use openrouter instead of vanilla openai
This commit is contained in:
parent
5d80864674
commit
80ddee9378
@ -85,8 +85,12 @@ async def next_vacancy(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:
|
||||
chat_model = ChatOpenAI(
|
||||
model_name="openai/gpt-5-mini",
|
||||
openai_api_base="https://openrouter.ai/api/v1",
|
||||
)
|
||||
agent = create_agent(
|
||||
model=ChatOpenAI(model_name="gpt-5-mini", reasoning_effort="minimal"),
|
||||
model=chat_model,
|
||||
tools=[get_user_resume],
|
||||
system_prompt=SYSTEM_PROMPT,
|
||||
checkpointer=checkpointer,
|
||||
|
||||
@ -46,7 +46,13 @@ class Command(BaseCommand):
|
||||
company_name: 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)
|
||||
|
||||
last_timestamp = timezone.now() - timedelta(days=30)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user