OuroborosM commited on
Commit
17ca76c
·
1 Parent(s): 9674fb9

correct func

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -92,14 +92,19 @@ class GPTRemote(LLM):
92
 
93
  output = asyncio.run(start_playwright(prompt))
94
  # output = "test custom llm"
95
- print(type(output))
96
  print(output)
97
  keywords = ['Action:', 'Action Input:', 'Observation:', 'Thought:', 'Final Answer:']
 
 
 
 
 
98
  for item in keywords:
99
  if item in output:
100
- output.replace(item, '\n'+item)
101
  print("treat output: ", output)
102
- return output
103
 
104
  @property
105
  def _identifying_params(self) -> Mapping[str, Any]:
 
92
 
93
  output = asyncio.run(start_playwright(prompt))
94
  # output = "test custom llm"
95
+ # print(type(output))
96
  print(output)
97
  keywords = ['Action:', 'Action Input:', 'Observation:', 'Thought:', 'Final Answer:']
98
+ # print("Judge 1: ", 'Action:' in output)
99
+ # print("Judge 2: ", 'Action Input:' in output)
100
+ # print("Judge 3: ", 'Observation:' in output)
101
+ # print("Judge 4: ", 'Thought:' in output)
102
+ # print("Judge Final Answer: ",'Final Answer:' in output)
103
  for item in keywords:
104
  if item in output:
105
+ output_t = output.replace(item, '\n'+item)
106
  print("treat output: ", output)
107
+ return output_t
108
 
109
  @property
110
  def _identifying_params(self) -> Mapping[str, Any]: