import ollama output = """ Interface IP-Address OK? Method Status Protocol GigabitEthernet0/0 192.168.1.1 YES NVRAM up up GigabitEthernet0/1 10.0.0.1 YES NVRAM administratively down down """ response = ollama.chat( model='llama3.2', messages=[ { 'role': 'user', 'content': f'Which interfaces have problems? Return just one sentence summarizing which interfaces are down.\n\n{output}' } ] ) print(response['message']['content'])