Add support for other backends, such as OpenRouter and olama

This aims to offer alternative OpenAI capable api's.
This offers people to experiment with running the application locally
This commit is contained in:
maxer137 committed 2025-06-11 14:19:25 +02:00
1 parent a879868396
commit 99789f9cd1
6 files changed
+110 -41

No files matched your search

+9 -6
View File
@@ -703,10 +703,11 @@ def get_YFin_data(
def get_stock_news_openai(ticker, curr_date):
client = OpenAI()
config = get_config()
client = OpenAI(base_url=config["openai_backend"])
response = client.responses.create(
model="gpt-4.1-mini",
model=config["quick_think_llm"],
input=[
{
"role": "system",
@@ -737,10 +738,11 @@ def get_stock_news_openai(ticker, curr_date):
def get_global_news_openai(curr_date):
client = OpenAI()
config = get_config()
client = OpenAI(base_url=config["openai_backend"])
response = client.responses.create(
model="gpt-4.1-mini",
model=config["quick_think_llm"],
input=[
{
"role": "system",
@@ -771,10 +773,11 @@ def get_global_news_openai(curr_date):
def get_fundamentals_openai(ticker, curr_date):
client = OpenAI()
config = get_config()
client = OpenAI(base_url=config["openai_backend"])
response = client.responses.create(
model="gpt-4.1-mini",
model=config["quick_think_llm"],
input=[
{
"role": "system",