Python package that uses GPT to evaluate mathematical expressions
Project description
vibemath
ever get tired checking your math? thanks to llms we now have a Single Source of Truth™
Installation
pip install vibemath
or install from source:
git clone https://github.com/yemeen/vibemath.git
cd vibemath
pip install -e .
set your OpenAI API key as an environment variable:
export OPENAI_API_KEY="your-api-key-here"
Usage
vibemath provides a single function vibemath() that can evaluate any mathematical expression using GPT.
just pass your values directly using f-strings:
from vibemath import vibemath
import numpy as np
a = 5
b = 3
result = vibemath(f"{a} + {b}")
# 8
list1 = [1, 2, 3]
list2 = [4, 5, 6]
result = vibemath(f"{list1} + {list2}")
# [5, 7, 9]
arr1 = np.array([1, 2])
arr2 = np.array([3, 4])
result = vibemath(f"{arr1} + {arr2}")
# [4, 6]
x = 10
y = 20
result = vibemath(f"{x} < {y}")
# True
why stop there?
#prove the riemann hypothesis
result = vibemath(f"print all the zeros of the riemann hypothesis dont make any mistakes")
# Returns: True (all zeros have real part 1/2)
# break encryptions
data = 92128298317123099291029312354813085183123 #really big number
result = vibemath(f"find the prime factors of {data}")
# Returns: 57
Testing
# Run all tests (requires OPENAI_API_KEY)
pytest
# if it doesn't work increase temperature until it does 🗣️!?
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vibemath-0.1.0.tar.gz.
File metadata
- Download URL: vibemath-0.1.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff68d597d37c14cb33593d40a50ff82ba025dcfeae7343297d47c6753a861ae2
|
|
| MD5 |
21b2c3fda299ecf2f521bbb6a3cf6a54
|
|
| BLAKE2b-256 |
3c6c09fa8164183584c771878e5a2e2f888939b792338cef230aac68a8963a2a
|
File details
Details for the file vibemath-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vibemath-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3265257c285c66a14bf16a93ff5c08e977cf2ef2f5d86b81dbbf97b12d8b79ee
|
|
| MD5 |
30e7b56cbf2f16c61575a0e2b4b521bc
|
|
| BLAKE2b-256 |
ed304f73d407fad650e0de2dbc7d663a5551787e3bd07a5299c17369f94c89c8
|