Spaces:
Runtime error
Runtime error
Commit
·
c3a6237
1
Parent(s):
7fd5cc1
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,8 @@ genai.configure(api_key=os.getenv("GOOGLE_PALM_KEY"))
|
|
6 |
|
7 |
|
8 |
def generate(prompt, history, system):
|
|
|
|
|
9 |
sub_arrays_as_strings = [' '.join(sub_array) for sub_array in history]
|
10 |
result_string = ' '.join(sub_arrays_as_strings)
|
11 |
response = genai.chat(
|
|
|
6 |
|
7 |
|
8 |
def generate(prompt, history, system):
|
9 |
+
history = [['' if item is None else item for item in sub_array] for sub_array in history]
|
10 |
+
|
11 |
sub_arrays_as_strings = [' '.join(sub_array) for sub_array in history]
|
12 |
result_string = ' '.join(sub_arrays_as_strings)
|
13 |
response = genai.chat(
|