MCPcopy
hub / github.com/algorithmicsuperintelligence/optillm / extract_output

Method extract_output

optillm/leap.py:27–29  ·  view source on GitHub ↗
(self, text: str)

Source from the content-addressed store, hash-verified

25 self.max_tokens = request_config.get('max_tokens', self.max_tokens)
26
27 def extract_output(self, text: str) -> str:
28 match = re.search(r'<output>(.*?)(?:</output>|$)', text, re.DOTALL)
29 return match.group(1).strip() if match else ""
30
31 def _extract_content(self, response, context: str) -> str:
32 """Validate a provider response and return its message content.

Calls 1

searchMethod · 0.45

Tested by

no test coverage detected