File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ We utilize the [bigcode-evaluation-harness](https://github.com/bigcode-project/b
3434
35352. ** Install Dependencies:**
3636 ` ` ` shell
37+ # pip install -r requirements-hpu.txt, if you deploy microservices on the Gaudi.
3738 pip install -r requirements.txt
3839 pip install -e .
3940 ` ` `
Original file line number Diff line number Diff line change @@ -280,7 +280,15 @@ async def handle_request(self, request: Request):
280280
281281 # Get the response from the last node in the runtime graph
282282 last_node = runtime_graph .all_leaves ()[- 1 ]
283- response = result_dict [last_node ]["text" ]
283+
284+ try :
285+ response = result_dict [last_node ]["choices" ][0 ]["text" ]
286+ except (KeyError , IndexError , TypeError ):
287+ try :
288+ response = result_dict [last_node ]["text" ]
289+ except (KeyError , TypeError ):
290+ response = "Response Error"
291+
284292 choices = []
285293 usage = UsageInfo ()
286294 choices .append (
You can’t perform that action at this time.
0 commit comments