Welcome to OpenO1, an open-source self-reasoning AI chatbot (not $200 per month :O) that breaks down complex queries into logical, step-by-step reasoning to deliver precise and insightful answers.
- Step-by-Step Reasoning: OpenO1 constructs logical reasoning steps to tackle queries systematically.
- Interactive Logging: Every reasoning step is logged and available for review.
- Final Answer Generation: The final result is generated with the Reasoning file as context to the request.
To set up OpenO1 locally, follow these steps:
# Clone the repository
git clone https://github.com/Corzed/OpenO1.git
# Navigate to the project directory
cd OpenO1
- Start OpenO1:
python OpenO1.py
- Enter your query: Type your question and let OpenO1 process it.
- Interactive Post-Query Options:
- Review the thought process.
- Save the final answer.
- Ask another question.
- Exit the chatbot.
Prompt:
How many 'r's are in the word 'strawberry'?
Reasoning:
Step 1:
To determine how many 'r's are in the word 'strawberry', the first step is to analyze the spelling of the word itself.
1. **Identify the letters in 'strawberry'**:
The word 'strawberry' consists of the following letters: s, t, r, a, w, b, e, r, r, y.
Next, I will count the occurrences of the letter 'r' in this list.
**DECISION: CONTINUE**: The next step is to count how many times the letter 'r' appears in the word 'strawberry'.
Step 2:
Now, I will count the occurrences of the letter 'r' in the word 'strawberry':
2. **Count the 'r's**:
In the spelling: s, t, **r**, a, w, b, **e**, **r**, **r**, y, we can identify the positions of the 'r's:
- The first 'r' appears after 't' in the third position.
- The second 'r' appears after 'e' in the seventh position.
- The third 'r' appears after the second 'r' in the eighth position.
Now, let's tally them up.
**DECISION: STOP**: The counting process has concluded, and we have identified that there are a total of **three 'r's** in the word 'strawberry'.
Output:
There are three 'r's in the word 'strawberry'.
OpenO1.py
: Main script to run the chatbot.thought_log.txt
: Log file containing reasoning steps.final_answer.txt
: File where the final answer can be saved.
-
Environment Variable: Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY='your-api-key'
-
Default Model:
gpt-4o-mini
(can be changed in the script).
We welcome contributions! To contribute:
- Fork the repository.
- Create a feature branch.
- Commit your changes.
- Submit a pull request.
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.
Feel free to open an issue!