iteratively invoking Large Language Models (LLM) using Ollama via langchain_community
package
iteratively invoke an LLM with different prompts
iteratively prompts an LLM to explain itself. saves the responses in csv and txt file formats.
- Python 3.x
- Packages:
argparse
,pandas
,langchain_community
,langchain
,langchain_core
install the required packages using pip:
pip install argparse pandas langchain_community
- clone the repo or copy the script to your local machine.
- run the script with the desired number of iterations:
python loop.py [iterations]
(if no iterations are given, the loop scripts default to 10)
output files will be saved in the outputs/pitching
directory with a filename format that includes the model name, temperature, and a timestamp.
python explainyourself.py
output files are saved in the outputs/*
directories with filenames that include the model name and a timestamp.