Update app_2.py
Browse files
app_2.py
CHANGED
|
@@ -5,7 +5,7 @@ from google.genai import types
|
|
| 5 |
client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
|
| 6 |
MODEL = "gemini-3.1-flash-lite-preview"
|
| 7 |
|
| 8 |
-
def model_chat(message, state):
|
| 9 |
if state is None:
|
| 10 |
state = {"chat": client.chats.create(model=MODEL), "lock": threading.Lock()}
|
| 11 |
|
|
|
|
| 5 |
client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])
|
| 6 |
MODEL = "gemini-3.1-flash-lite-preview"
|
| 7 |
|
| 8 |
+
def model_chat(message, history, state): # <- 3 args!
|
| 9 |
if state is None:
|
| 10 |
state = {"chat": client.chats.create(model=MODEL), "lock": threading.Lock()}
|
| 11 |
|