File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,8 @@ def stream_validate(
104104 )
105105 if line :
106106 json_output = json .loads (line )
107+ if (json_output .get ("error" )):
108+ raise Exception (json_output .get ("error" ).get ("message" ))
107109 yield IValidationOutcome .from_dict (json_output )
108110
109111 def get_history (self , guard_name : str , call_id : str ):
Original file line number Diff line number Diff line change @@ -1285,9 +1285,10 @@ def _stream_server_call(
12851285 guard_history = self ._api_client .get_history (
12861286 self .name , validation_output .call_id
12871287 )
1288- self .history .extend (
1289- [Call .from_interface (call ) for call in guard_history ]
1290- )
1288+ # TODO renable this. doesnt work in a multiple server environment
1289+ # self.history.extend(
1290+ # [Call.from_interface(call) for call in guard_history]
1291+ # )
12911292 else :
12921293 raise ValueError ("Guard does not have an api client!" )
12931294
Original file line number Diff line number Diff line change @@ -498,6 +498,9 @@ def _invoke_llm(
498498 ),
499499 )
500500
501+ kwargs .pop ("reask_prompt" , None )
502+ kwargs .pop ("reask_instructions" , None )
503+
501504 response = completion (
502505 model = model ,
503506 * args ,
@@ -1088,6 +1091,9 @@ async def invoke_llm(
10881091 ),
10891092 )
10901093
1094+ kwargs .pop ("reask_prompt" , None )
1095+ kwargs .pop ("reask_instructions" , None )
1096+
10911097 response = await acompletion (
10921098 * args ,
10931099 ** kwargs ,
You can’t perform that action at this time.
0 commit comments