def summarize_text(text: str) -> str: response = client.responses.create( model=SUMMARY_MODEL, input=[ { "role": "system", "content": ( "Summarize this passage for retrieval " "in 2-3 concise sentences. Preserve " "important concepts, terms, examples, " "and claims. Add no new facts." ), }, { "role": "user", "content": text, }, ], ) return response.output_text.strip() __ __