Spaces:
Sleeping
Sleeping
from langchain_google_genai import ChatGoogleGenerativeAI | |
from fastapi import FastAPI | |
from typing import Union | |
app = FastAPI() | |
def read_root(): | |
return {"Hello": "World"} | |
llm = ChatGoogleGenerativeAI(model="gemini-pro",google_api_key="AIzaSyAur2W5VT7Q612b_umm26BwQprv8Rky090") | |
def read_item(): | |
return llm | |
def read_item(text): | |
res = llm.invoke(text).content | |
return res |