Spaces:
Sleeping
Sleeping
File size: 524 Bytes
e00943e 39a1738 e00943e ba9644b 39a1738 ba9644b 39a1738 e00943e ba9644b e00943e 39a1738 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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)
|