Skip to content

Commit

Permalink
Changed the url for the metaculus proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
CodexVeritas committed Dec 20, 2024
1 parent 592730f commit b26db37
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"\n",
"Here are the tools most likely to be useful to you:\n",
"- 🎯 **Forecasting Bot:** General Forecaster that integrates with the Metaculus AI benchmarking competition. You can forecast with a pre-existing bot or override the class to customize your own (without redoing all the API code, etc)\n",
"- 🔍 **Perplexity++ Smart Searcher:** An AI-powered internet-informed llm powered by Exa.ai. Its a better (but more expensive) alternative to Perplexity.ai that is configurable, more accurate, able to decide on filters, able to link to exact paragraphs, etc.\n",
"- 🔍 **Perplexity++ Smart Searcher:** An AI-powered internet-informed llm powered by Exa.ai. Its a better (but slightly more expensive) alternative to Perplexity.ai that is configurable, more accurate, able to decide on filters, able to link to exact paragraphs, etc.\n",
"- 🔑 **Key Factor Analysis:** Key Factors Analysis for scoring, ranking, and prioritizing important variables in forecasting questions\n",
"\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion forecasting_tools/ai_models/metaculus4o.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Gpt4oMetaculusProxy(OpenAiTextToTextModel):

METACULUS_TOKEN = os.getenv("METACULUS_TOKEN")
_OPENAI_ASYNC_CLIENT = AsyncOpenAI(
base_url="https://www.metaculus.com/proxy/openai/v1",
base_url="https://llm-proxy.metaculus.com/proxy/openai/v1",
default_headers={
"Content-Type": "application/json",
"Authorization": f"Token {METACULUS_TOKEN}",
Expand Down
15 changes: 12 additions & 3 deletions forecasting_tools/forecasting/forecast_bots/template_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from datetime import datetime

from forecasting_tools.ai_models.ai_utils.ai_misc import clean_indents
from forecasting_tools.ai_models.claude35sonnet import Claude35Sonnet
from forecasting_tools.ai_models.gpt4o import Gpt4o
from forecasting_tools.ai_models.metaculus4o import Gpt4oMetaculusProxy
from forecasting_tools.ai_models.perplexity import Perplexity
Expand Down Expand Up @@ -34,9 +35,17 @@

class TemplateBot(ForecastBot):
FINAL_DECISION_LLM = (
Gpt4oMetaculusProxy(temperature=0.7)
if os.getenv("METACULUS_TOKEN")
else Gpt4o(temperature=0.7)
Gpt4o(temperature=0.7)
if os.getenv("OPENAI_API_KEY")
else (
Gpt4oMetaculusProxy(temperature=0.7)
if os.getenv("METACULUS_TOKEN")
else (
Claude35Sonnet(temperature=0.7)
if os.getenv("ANTHROPIC_API_KEY")
else Gpt4o(temperature=0.7)
)
)
)

async def run_research(self, question: MetaculusQuestion) -> str:
Expand Down

0 comments on commit b26db37

Please sign in to comment.