From 486d5ea33aadfbd94ebab938a97fb53c9f9925de Mon Sep 17 00:00:00 2001 From: John lee Date: Thu, 29 Aug 2024 11:09:29 +0000 Subject: [PATCH] open router fix --- external_components/llm_extraction/app.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/external_components/llm_extraction/app.py b/external_components/llm_extraction/app.py index ca86200d..c2da89e4 100644 --- a/external_components/llm_extraction/app.py +++ b/external_components/llm_extraction/app.py @@ -10,13 +10,12 @@ # from pydantic import BaseModel, Field from osm.schemas.metrics_schemas import LLMExtractorMetrics - +from llama_index.llms.openrouter import OpenRouter LLM_MODELS = { - "gpt-4o-2024-08-06": OpenAI( - base_url="https://openrouter.ai/api/v1", - api_key=os.environ.get("OPENROUTER_API_KEY"), - model="gpt-4o-2024-08-06", - ) + "gpt-4o-2024-08-06": OpenRouter( + api_key=os.environ["OPENROUTER_API_KEY"], + model="openai/chatgpt-4o-latest", +) }