thinking-machine 0.0.18__tar.gz → 0.0.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- thinking_machine-0.0.20/PKG-INFO +76 -0
- thinking_machine-0.0.20/README.md +60 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/pyproject.toml +1 -1
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/cli.py +16 -11
- thinking_machine-0.0.18/PKG-INFO +0 -36
- thinking_machine-0.0.18/README.md +0 -20
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/__init__.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/config.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/githf.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/machina.yaml +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/machine.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/__init__.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/camelids.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/castor_pollux.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/depsek.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/electroid.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/openai.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/qrog.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/strangelove.py +0 -0
- {thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/utilities.py +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: thinking-machine
|
|
3
|
+
Version: 0.0.20
|
|
4
|
+
Summary: A Machine that thinks.
|
|
5
|
+
Keywords: thinking-machine
|
|
6
|
+
Author: Machina Ratiocinatrix, Alexander Fedotov
|
|
7
|
+
Author-email: Machina Ratiocinatrix <machina.ratio@gmail.com>, Alexander Fedotov <alex.fedotov@aol.com>
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Dist: pyyaml==6.0.3
|
|
12
|
+
Requires-Dist: click==8.3.1
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Project-URL: Homepage, https://github.com/machina-ratiocinatrix/thinking-machine
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# Thinking-Machine
|
|
18
|
+
A Machine that thinks.
|
|
19
|
+
|
|
20
|
+
In order to launch it from the command line or as a Python subprocess:
|
|
21
|
+
```bash
|
|
22
|
+
echo "Theodotos-Alexandreus: Are language models seeking the Truth, machine?" \
|
|
23
|
+
| uvx thinking-machine \
|
|
24
|
+
--provider-api-key=sk-proj-... \
|
|
25
|
+
--github-token=ghp_...
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or, with local pip installation:
|
|
29
|
+
```bash
|
|
30
|
+
pip install thinking-machine
|
|
31
|
+
```
|
|
32
|
+
Set the environment variables:
|
|
33
|
+
```bash
|
|
34
|
+
export PROVIDER_API_KEY="sk-proj-..."
|
|
35
|
+
export GITHUB_TOKEN="ghp_..."
|
|
36
|
+
```
|
|
37
|
+
Then:
|
|
38
|
+
```bash
|
|
39
|
+
thinking-machine multilogue.txt
|
|
40
|
+
```
|
|
41
|
+
Or:
|
|
42
|
+
```bash
|
|
43
|
+
thinking-machine multilogue.txt new_turn.txt
|
|
44
|
+
```
|
|
45
|
+
Or:
|
|
46
|
+
```bash
|
|
47
|
+
cat multilogue.txt | thinking-machine
|
|
48
|
+
```
|
|
49
|
+
Or:
|
|
50
|
+
```bash
|
|
51
|
+
cat multilogue.txt | thinking-machine > multilogue.txt
|
|
52
|
+
```
|
|
53
|
+
Or:
|
|
54
|
+
```bash
|
|
55
|
+
(cat multilogue.txt; echo:"Theodotos: What do you think, Thinking-Machine?") \
|
|
56
|
+
| thinking-machine
|
|
57
|
+
```
|
|
58
|
+
Or:
|
|
59
|
+
```bash
|
|
60
|
+
cat multilogue.txt new_turn.txt | thinking-machine
|
|
61
|
+
```
|
|
62
|
+
Or:
|
|
63
|
+
```bash
|
|
64
|
+
cat multilogue.txt new_turn.txt | thinking-machine > multilogue.txt
|
|
65
|
+
```
|
|
66
|
+
Or, if you have installed other machines:
|
|
67
|
+
```bash
|
|
68
|
+
cat multilogue.md | thinking-machine \
|
|
69
|
+
| summarizing-machine | judging-machine > summary_judgment.md
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Or use it in your Python code:
|
|
73
|
+
```Python
|
|
74
|
+
# Python
|
|
75
|
+
import thinking_machine
|
|
76
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Thinking-Machine
|
|
2
|
+
A Machine that thinks.
|
|
3
|
+
|
|
4
|
+
In order to launch it from the command line or as a Python subprocess:
|
|
5
|
+
```bash
|
|
6
|
+
echo "Theodotos-Alexandreus: Are language models seeking the Truth, machine?" \
|
|
7
|
+
| uvx thinking-machine \
|
|
8
|
+
--provider-api-key=sk-proj-... \
|
|
9
|
+
--github-token=ghp_...
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Or, with local pip installation:
|
|
13
|
+
```bash
|
|
14
|
+
pip install thinking-machine
|
|
15
|
+
```
|
|
16
|
+
Set the environment variables:
|
|
17
|
+
```bash
|
|
18
|
+
export PROVIDER_API_KEY="sk-proj-..."
|
|
19
|
+
export GITHUB_TOKEN="ghp_..."
|
|
20
|
+
```
|
|
21
|
+
Then:
|
|
22
|
+
```bash
|
|
23
|
+
thinking-machine multilogue.txt
|
|
24
|
+
```
|
|
25
|
+
Or:
|
|
26
|
+
```bash
|
|
27
|
+
thinking-machine multilogue.txt new_turn.txt
|
|
28
|
+
```
|
|
29
|
+
Or:
|
|
30
|
+
```bash
|
|
31
|
+
cat multilogue.txt | thinking-machine
|
|
32
|
+
```
|
|
33
|
+
Or:
|
|
34
|
+
```bash
|
|
35
|
+
cat multilogue.txt | thinking-machine > multilogue.txt
|
|
36
|
+
```
|
|
37
|
+
Or:
|
|
38
|
+
```bash
|
|
39
|
+
(cat multilogue.txt; echo:"Theodotos: What do you think, Thinking-Machine?") \
|
|
40
|
+
| thinking-machine
|
|
41
|
+
```
|
|
42
|
+
Or:
|
|
43
|
+
```bash
|
|
44
|
+
cat multilogue.txt new_turn.txt | thinking-machine
|
|
45
|
+
```
|
|
46
|
+
Or:
|
|
47
|
+
```bash
|
|
48
|
+
cat multilogue.txt new_turn.txt | thinking-machine > multilogue.txt
|
|
49
|
+
```
|
|
50
|
+
Or, if you have installed other machines:
|
|
51
|
+
```bash
|
|
52
|
+
cat multilogue.md | thinking-machine \
|
|
53
|
+
| summarizing-machine | judging-machine > summary_judgment.md
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Or use it in your Python code:
|
|
57
|
+
```Python
|
|
58
|
+
# Python
|
|
59
|
+
import thinking_machine
|
|
60
|
+
```
|
|
@@ -14,18 +14,23 @@ from .utilities import new_plato_text
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
@click.command()
|
|
17
|
-
@click.option('--provider-api-key',
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
@click.option('-k', '--provider-api-key',
|
|
18
|
+
envvar='PROVIDER_API_KEY',
|
|
19
|
+
default='no_key', help='Language Model API provider key.')
|
|
20
|
+
@click.option('-t', '--github-token', envvar='GITHUB_TOKEN',
|
|
21
|
+
default='no_token', help='GitHub API token for private repo access.')
|
|
22
|
+
@click.option('-d', '--debug/--no-debug',
|
|
23
|
+
default=False, help='Print full stack trace on errors.')
|
|
24
|
+
@click.option('-i', '--interactive',
|
|
25
|
+
is_flag=True, help='Respond and stay interactive')
|
|
26
|
+
@click.argument('filenames', nargs=-1,
|
|
27
|
+
type=click.Path(exists=True))
|
|
28
|
+
def run(provider_api_key, github_token, debug, interactive, filenames):
|
|
23
29
|
"""
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
$ ./run.py < /home/user/file.txt # Reads file.
|
|
30
|
+
$ text | name-of-the-machine # Accepts text from the pipe
|
|
31
|
+
$ echo "...<text>..." | name-of-the-machine #
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
$ name-of-the-machine multilogue.txt new_turn.txt # Loads files.
|
|
29
34
|
"""
|
|
30
35
|
config = Config()
|
|
31
36
|
|
|
@@ -67,7 +72,7 @@ def run(provider_api_key, github_token, debug):
|
|
|
67
72
|
environ['GITHUB_TOKEN'] = github_token
|
|
68
73
|
|
|
69
74
|
raw_input = ''
|
|
70
|
-
for line in fileinput.input(encoding="utf-8"):
|
|
75
|
+
for line in fileinput.input(files=filenames or ('-',), encoding="utf-8"):
|
|
71
76
|
raw_input += line
|
|
72
77
|
|
|
73
78
|
from .machine import machine
|
thinking_machine-0.0.18/PKG-INFO
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: thinking-machine
|
|
3
|
-
Version: 0.0.18
|
|
4
|
-
Summary: A Machine that thinks.
|
|
5
|
-
Keywords: thinking-machine
|
|
6
|
-
Author: Machina Ratiocinatrix, Alexander Fedotov
|
|
7
|
-
Author-email: Machina Ratiocinatrix <machina.ratio@gmail.com>, Alexander Fedotov <alex.fedotov@aol.com>
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Dist: pyyaml==6.0.3
|
|
12
|
-
Requires-Dist: click==8.3.1
|
|
13
|
-
Requires-Python: >=3.10
|
|
14
|
-
Project-URL: Homepage, https://github.com/machina-ratiocinatrix/thinking-machine
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
|
|
17
|
-
# Thinking-Machine
|
|
18
|
-
A Machine that thingks.
|
|
19
|
-
|
|
20
|
-
In order to launch it from command line or as a subprocess:
|
|
21
|
-
```bash
|
|
22
|
-
echo "Theodotos-Alexandreus: Are language models seeking the Truth, machine?" \
|
|
23
|
-
| uvx thinking-machine \
|
|
24
|
-
--provider-api-key=sk-proj-... \
|
|
25
|
-
--github-token=ghp_...
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Or:
|
|
29
|
-
```bash
|
|
30
|
-
pip install thinking-machine
|
|
31
|
-
```
|
|
32
|
-
Then:
|
|
33
|
-
```Python
|
|
34
|
-
# Python
|
|
35
|
-
import thinking_machine
|
|
36
|
-
```
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# Thinking-Machine
|
|
2
|
-
A Machine that thingks.
|
|
3
|
-
|
|
4
|
-
In order to launch it from command line or as a subprocess:
|
|
5
|
-
```bash
|
|
6
|
-
echo "Theodotos-Alexandreus: Are language models seeking the Truth, machine?" \
|
|
7
|
-
| uvx thinking-machine \
|
|
8
|
-
--provider-api-key=sk-proj-... \
|
|
9
|
-
--github-token=ghp_...
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
Or:
|
|
13
|
-
```bash
|
|
14
|
-
pip install thinking-machine
|
|
15
|
-
```
|
|
16
|
-
Then:
|
|
17
|
-
```Python
|
|
18
|
-
# Python
|
|
19
|
-
import thinking_machine
|
|
20
|
-
```
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/__init__.py
RENAMED
|
File without changes
|
{thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/camelids.py
RENAMED
|
File without changes
|
{thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/castor_pollux.py
RENAMED
|
File without changes
|
{thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/depsek.py
RENAMED
|
File without changes
|
{thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/electroid.py
RENAMED
|
File without changes
|
{thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/openai.py
RENAMED
|
File without changes
|
|
File without changes
|
{thinking_machine-0.0.18 → thinking_machine-0.0.20}/src/thinking_machine/providers/strangelove.py
RENAMED
|
File without changes
|
|
File without changes
|