Spaces:
Running
Running
Adds ChatGoogleGenerativeAI
Browse filesFiles changed (5)
- .gitignore+1
- app.py+2-1
- requirements.txt+2-1
- ring.py+17-1
- test.py+9-1
3 unmodified lines4563 unmodified lines/models/LEMS_Sim_IClamp_GenericMuscleCell.xml/report.Sim_IClamp_GenericMuscleCell.txt/report.Sim_IClamp_GenericNeuronCell.txt3 unmodified lines45673 unmodified lines/models/LEMS_Sim_IClamp_GenericMuscleCell.xml/report.Sim_IClamp_GenericMuscleCell.txt/report.Sim_IClamp_GenericNeuronCell.txt*v.dat
6 unmodified lines78910111274 unmodified lines878889909192936 unmodified linesfrom ring import LLM_GPT4from ring import LLM_GPT4ofrom ring import LLM_LLAMA2from ring import PREF_ORDER_LLMS74 unmodified lineselif submitted:response = generate_panel_response(text,llm_panelists=[LLM_GPT35, LLM_GPT4],llm_panel_chair=LLM_GPT4o,temperature=temperature,)6 unmodified lines7891011121374 unmodified lines888990919293946 unmodified linesfrom ring import LLM_GPT4from ring import LLM_GPT4ofrom ring import LLM_LLAMA2from ring import LLM_GEMINIfrom ring import PREF_ORDER_LLMS74 unmodified lineselif submitted:response = generate_panel_response(text,llm_panelists=[LLM_GPT35, LLM_GPT4, LLM_GEMINI],llm_panel_chair=LLM_GPT4o,temperature=temperature,)
8 unmodified lines91011128 unmodified linesmatplotlibpylemspyneuromlpaper-qa==4.0.0rc88 unmodified lines9101112138 unmodified linesmatplotlibpylemspyneuromlpaper-qa==4.0.0rc8langchain-google-genai
9 unmodified lines1011121314151617181920 unmodified lines40414243444532 unmodified lines7879808182839 unmodified linesLLM_GPT4 = "GPT4"LLM_GPT4o = "GPT4o"LLM_LLAMA2 = "LLAMA2"OPENAI_LLMS = [LLM_GPT35, LLM_GPT4, LLM_GPT4o]PREF_ORDER_LLMS = (LLM_LLAMA2, LLM_GPT35, LLM_GPT4, LLM_GPT4o)def requires_openai_key(llm_ver):20 unmodified linesreturn llamaapi_keydef get_llm(llm_ver, temperature):if llm_ver == LLM_GPT35:32 unmodified linesllm = ChatLlamaAPI(client=llama)return llm9 unmodified lines101112131415161718192020 unmodified lines4142434445464748495051525332 unmodified lines86878889909192939495969798999 unmodified linesLLM_GPT4 = "GPT4"LLM_GPT4o = "GPT4o"LLM_LLAMA2 = "LLAMA2"LLM_GEMINI = "Gemini"OPENAI_LLMS = [LLM_GPT35, LLM_GPT4, LLM_GPT4o]PREF_ORDER_LLMS = (LLM_GEMINI, LLM_LLAMA2, LLM_GPT35, LLM_GPT4, LLM_GPT4o)def requires_openai_key(llm_ver):20 unmodified linesreturn llamaapi_keydef get_gemini_api_key():gemini_api_key = os.environ.get("GEMINIAPI_KEY")return gemini_api_keydef get_llm(llm_ver, temperature):if llm_ver == LLM_GPT35:32 unmodified linesllm = ChatLlamaAPI(client=llama)elif llm_ver == LLM_GEMINI:from langchain_google_genai import ChatGoogleGenerativeAIllm = ChatGoogleGenerativeAI(model="gemini-pro", google_api_key=get_gemini_api_key())return llm
1 unmodified line2345678910111213141516171819201 unmodified linefrom ring import LLM_GPT4from ring import LLM_GPT4ofrom ring import LLM_LLAMA2from ring import PREF_ORDER_LLMSfrom ring import generate_responsequestion = "What is the most common type of neuron in the brain?"llm_ver = LLM_GPT4oprint("--------------------------------------------------------")print("Asking question:\n %s" % question)print("--------------------------------------------------------")response = generate_response(question, llm_ver, temperature=0, only_celegans=False)1 unmodified line23456789101112131415161718192021222324252627281 unmodified linefrom ring import LLM_GPT4from ring import LLM_GPT4ofrom ring import LLM_LLAMA2from ring import LLM_GEMINIfrom ring import PREF_ORDER_LLMSfrom ring import generate_responseimport sysquestion = "What is the most common type of neuron in the brain?"llm_ver = LLM_GPT4oif "-g" in sys.argv:llm_ver = LLM_GEMINIprint("--------------------------------------------------------")print("Asking question:\n %s" % question)print("--------------------------------------------------------")print(" ... Connecting to: %s" % llm_ver)response = generate_response(question, llm_ver, temperature=0, only_celegans=False)
.gitignore+1
app.py+2-1
requirements.txt+2-1
ring.py+17-1
test.py+9-1