Spaces:
Running
Running
Fix gemini
Browse files
ring.py
CHANGED
|
@@ -7,7 +7,7 @@ from openworm_ai.utils.llms import GENERAL_QUERY_PROMPT_TEMPLATE
|
|
| 7 |
from openworm_ai.utils.llms import GENERAL_QUERY_LIMITED_PROMPT_TEMPLATE
|
| 8 |
|
| 9 |
from openworm_ai.utils.llms import get_llm as get_llm_via_openworm_ai
|
| 10 |
-
|
| 11 |
from openworm_ai.utils.llms import requires_openai_key
|
| 12 |
from openworm_ai.utils.llms import get_openai_api_key
|
| 13 |
|
|
@@ -24,15 +24,16 @@ from openworm_ai.utils.llms import LLM_COHERE
|
|
| 24 |
|
| 25 |
OPENAI_LLMS = [LLM_GPT35, LLM_GPT4, LLM_GPT4o]
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
|
| 29 |
LLM_LLAMA2 = "LLAMA2"
|
| 30 |
LLM_GEMINI = "gemini-1.5-pro"
|
| 31 |
LLM_CLAUDE2 = "Claude2.1"
|
| 32 |
|
| 33 |
|
| 34 |
-
PREF_ORDER_LLMS = [LLM_GEMINI
|
| 35 |
-
LLM_COHERE]
|
| 36 |
|
| 37 |
|
| 38 |
|
|
@@ -41,6 +42,10 @@ def get_llamaapi_key():
|
|
| 41 |
|
| 42 |
return llamaapi_key
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
def get_anthropic_key():
|
| 46 |
anthropic_api_key = os.environ.get["ANTHROPIC_API_KEY"]
|
|
|
|
| 7 |
from openworm_ai.utils.llms import GENERAL_QUERY_LIMITED_PROMPT_TEMPLATE
|
| 8 |
|
| 9 |
from openworm_ai.utils.llms import get_llm as get_llm_via_openworm_ai
|
| 10 |
+
|
| 11 |
from openworm_ai.utils.llms import requires_openai_key
|
| 12 |
from openworm_ai.utils.llms import get_openai_api_key
|
| 13 |
|
|
|
|
| 24 |
|
| 25 |
OPENAI_LLMS = [LLM_GPT35, LLM_GPT4, LLM_GPT4o]
|
| 26 |
|
| 27 |
+
OLLAMA_LLMS = [LLM_OLLAMA_LLAMA32_1B, LLM_OLLAMA_MISTRAL, LLM_OLLAMA_OLMO2_7B]
|
| 28 |
+
|
| 29 |
+
OPENWORM_AI_LLMS = [LLM_GEMINI_2F] + OPENAI_LLMS + [LLM_COHERE] # + oLLAMA_LLMS
|
| 30 |
|
| 31 |
LLM_LLAMA2 = "LLAMA2"
|
| 32 |
LLM_GEMINI = "gemini-1.5-pro"
|
| 33 |
LLM_CLAUDE2 = "Claude2.1"
|
| 34 |
|
| 35 |
|
| 36 |
+
PREF_ORDER_LLMS = [LLM_GEMINI] + OPENWORM_AI_LLMS + [LLM_LLAMA2, LLM_CLAUDE2]
|
|
|
|
| 37 |
|
| 38 |
|
| 39 |
|
|
|
|
| 42 |
|
| 43 |
return llamaapi_key
|
| 44 |
|
| 45 |
+
def get_gemini_api_key():
|
| 46 |
+
gemini_api_key = os.environ.get("GEMINIAPI_KEY")
|
| 47 |
+
|
| 48 |
+
return gemini_api_key
|
| 49 |
|
| 50 |
def get_anthropic_key():
|
| 51 |
anthropic_api_key = os.environ.get["ANTHROPIC_API_KEY"]
|