This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from txtai import Embeddings, LLM | |
# Prompt courtesy of the following link: https://github.com/codelion/optillm/blob/main/cot_reflection.py | |
def cot(system, user): | |
system = f""" | |
{system} | |
You are an AI assistant that uses a Chain of Thought (CoT) approach with reflection to answer queries. Follow these steps: |
OlderNewer