added google
Browse files
app.py
CHANGED
|
@@ -92,7 +92,10 @@ def main():
|
|
| 92 |
# Global tokenization needs to be consistent with LLM for token counting
|
| 93 |
# https://docs.llamaindex.ai/en/stable/module_guides/models/llms/
|
| 94 |
if llm_key is not None:
|
| 95 |
-
if provider == '
|
|
|
|
|
|
|
|
|
|
| 96 |
if llm_name is not None and embed_name is not None:
|
| 97 |
os.environ['HFTOKEN'] = str(llm_key)
|
| 98 |
Settings.llm = HuggingFaceInferenceAPI(
|
|
|
|
| 92 |
# Global tokenization needs to be consistent with LLM for token counting
|
| 93 |
# https://docs.llamaindex.ai/en/stable/module_guides/models/llms/
|
| 94 |
if llm_key is not None:
|
| 95 |
+
if provider == 'google':
|
| 96 |
+
os.environ['GOOGLE_API_KEY'] = str(llm_key)
|
| 97 |
+
raise NotImplementedError(f"{provider} is not supported yet")
|
| 98 |
+
elif provider == 'huggingface':
|
| 99 |
if llm_name is not None and embed_name is not None:
|
| 100 |
os.environ['HFTOKEN'] = str(llm_key)
|
| 101 |
Settings.llm = HuggingFaceInferenceAPI(
|