Update palmapi.py

#2
by rphrp1985 - opened
Files changed (1) hide show
  1. palmapi.py +2 -7
palmapi.py CHANGED
@@ -91,13 +91,8 @@ async def gen_text(
91
  }
92
 
93
  response = await palm_api.chat_async(**parameters, messages=prompt)
94
-
95
- if len(response.filters) > 0 and \
96
- response.filters[0]['reason'] == 2:
97
- response_txt = "your request is blocked for some reasons"
98
-
99
- else:
100
- response_txt = response.last
101
 
102
  return response, response_txt
103
 
 
91
  }
92
 
93
  response = await palm_api.chat_async(**parameters, messages=prompt)
94
+
95
+ response_txt = response.last
 
 
 
 
 
96
 
97
  return response, response_txt
98