Spaces:
Sleeping
Sleeping
| from langchain_google_genai import ChatGoogleGenerativeAI | |
| from src.config import GEMINI_API_KEY, DEFAULT_MODEL | |
| _base_kwargs = dict( | |
| temperature=0, | |
| top_p=1, | |
| top_k=1, | |
| max_tokens=None, | |
| timeout=None, | |
| max_retries=2, | |
| google_api_key=GEMINI_API_KEY, | |
| ) | |
| llm = ChatGoogleGenerativeAI(model=DEFAULT_MODEL, **_base_kwargs) | |
| multimodal_llm = ChatGoogleGenerativeAI(model=DEFAULT_MODEL, **_base_kwargs) | |
| if __name__ == "__main__": | |
| response = llm.invoke("Hello World là gì?").content | |
| print(response) | |