thinking-machine 0.0.26__tar.gz → 0.1.1__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.
Files changed (32) hide show
  1. {thinking_machine-0.0.26/src/thinking_machine.egg-info → thinking_machine-0.1.1}/PKG-INFO +5 -27
  2. thinking_machine-0.1.1/README.md +38 -0
  3. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/pyproject.toml +2 -2
  4. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/cli.py +19 -10
  5. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/providers/depsek.py +2 -1
  6. {thinking_machine-0.0.26 → thinking_machine-0.1.1/src/thinking_machine.egg-info}/PKG-INFO +5 -27
  7. thinking_machine-0.0.26/README.md +0 -60
  8. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/LICENSE +0 -0
  9. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/MANIFEST.in +0 -0
  10. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/setup.cfg +0 -0
  11. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/__init__.py +0 -0
  12. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/config.py +0 -0
  13. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/githf.py +0 -0
  14. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/machina.yaml +0 -0
  15. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/machine.py +0 -0
  16. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/providers/__init__.py +0 -0
  17. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/providers/camelids.py +0 -0
  18. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/providers/castor_pollux.py +0 -0
  19. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/providers/electroid.py +0 -0
  20. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/providers/openai.py +0 -0
  21. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/providers/qrog.py +0 -0
  22. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/providers/strangelove.py +0 -0
  23. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine/utilities.py +0 -0
  24. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine.egg-info/SOURCES.txt +0 -0
  25. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine.egg-info/dependency_links.txt +0 -0
  26. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine.egg-info/entry_points.txt +0 -0
  27. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine.egg-info/requires.txt +0 -0
  28. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/src/thinking_machine.egg-info/top_level.txt +0 -0
  29. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/tests/test_cli.py +0 -0
  30. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/tests/test_e2e.py +0 -0
  31. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/tests/test_llm_soup.py +0 -0
  32. {thinking_machine-0.0.26 → thinking_machine-0.1.1}/tests/test_utilities.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thinking-machine
3
- Version: 0.0.26
4
- Summary: Thinking-Machine does thinking.
3
+ Version: 0.1.1
4
+ Summary: Thinking-Machine ...
5
5
  Author-email: Machina Ratiocinatrix <machina.ratio@gmail.com>, Alexander Fedotov <alex.fedotov@aol.com>
6
6
  Project-URL: Homepage, https://github.com/machina-ratiocinatrix/thinking-machine
7
7
  Keywords: thinking-machine
@@ -36,37 +36,15 @@ export GITHUB_TOKEN="ghp_..."
36
36
  ```
37
37
  Then:
38
38
  ```bash
39
- thinking-machine multilogue.txt
39
+ thinking-machine -a multilogue.txt
40
40
  ```
41
41
  Or:
42
42
  ```bash
43
- thinking-machine multilogue.txt new_turn.txt
43
+ thinking-machine multilogue.txt > response.txt
44
44
  ```
45
45
  Or:
46
46
  ```bash
47
- cat multilogue.txt | thinking-machine
48
- ```
49
- Or:
50
- ```bash
51
- cat multilogue.txt | thinking-machine > tmp && mv tmp 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 > tmp && mv tmp 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
47
+ thinking-machine -a multilogue.txt > tmp && echo tmp > multilogue.txt
70
48
  ```
71
49
 
72
50
  Or use it in your Python code:
@@ -0,0 +1,38 @@
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 a 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 -a multilogue.txt
24
+ ```
25
+ Or:
26
+ ```bash
27
+ thinking-machine multilogue.txt > response.txt
28
+ ```
29
+ Or:
30
+ ```bash
31
+ thinking-machine -a multilogue.txt > tmp && echo tmp > multilogue.txt
32
+ ```
33
+
34
+ Or use it in your Python code:
35
+ ```Python
36
+ # Python
37
+ import thinking_machine
38
+ ```
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "thinking-machine"
7
- version = "0.0.26"
7
+ version = "0.1.1"
8
8
  authors = [
9
9
  {name="Machina Ratiocinatrix", email="machina.ratio@gmail.com"},
10
10
  {name="Alexander Fedotov", email="alex.fedotov@aol.com"}
11
11
  ]
12
- description = "Thinking-Machine does thinking."
12
+ description = "Thinking-Machine ..."
13
13
  readme = "README.md"
14
14
  requires-python = ">=3.10"
15
15
  classifiers=[
@@ -10,6 +10,7 @@ import sys
10
10
  import select
11
11
  import fileinput
12
12
  import argparse
13
+ import syslog
13
14
  from .config import Config
14
15
  from .utilities import new_plato_text
15
16
 
@@ -35,9 +36,9 @@ def options_and_arguments():
35
36
  # action='store_true',
36
37
  # help="Enable interactive mode (defaults to False)")
37
38
 
38
- parser.add_argument('-d', '--debug',
39
+ parser.add_argument('-a', '--append',
39
40
  action='store_true',
40
- help="Debug mode flag")
41
+ help="Append the utterance to the input.")
41
42
 
42
43
  # Positional arguments (files)
43
44
  # '*' captures zero or more arguments into a list, nargs='+' one or more.
@@ -57,13 +58,6 @@ def run():
57
58
 
58
59
  args = options_and_arguments().parse_args()
59
60
 
60
- # If debug - arguments values, raw and parsed.
61
- if args.debug:
62
- print(f"Debug - Raw arguments: {sys.argv}\n")
63
- print(f"provider-api-key: {args.provider_api_key}")
64
- print(f"github-token: {args.github_token}")
65
- print(f"Files to process: {args.filenames}")
66
-
67
61
  # If no files are provided AND no data is being piped in - exit.
68
62
  if not args.filenames:
69
63
  # Check if stdin (fd 0) is ready to be read
@@ -122,9 +116,24 @@ def run():
122
116
 
123
117
  try:
124
118
  thoughts, text = machine(raw_input, config)
125
- output = raw_input + new_plato_text(thoughts, text, config.name)
119
+ output = new_plato_text(thoughts, text, config.name)
120
+ if args.append:
121
+ output = raw_input +'\n\n' + output
126
122
  sys.stdout.write(output)
127
123
  sys.stdout.flush()
124
+
125
+ # Assesment and signals.
126
+ utterance = "My answer is ready"
127
+ # Open syslog connection
128
+ syslog.openlog(
129
+ ident="thinking-machine",
130
+ logoption=syslog.LOG_PERROR | syslog.LOG_NDELAY,
131
+ facility=syslog.LOG_USER
132
+ )
133
+ # Signal (single line less than 4096 only!)
134
+ syslog.syslog(syslog.LOG_INFO, f"thinking-machine: {utterance}.")
135
+ syslog.closelog()
136
+
128
137
  except Exception as e:
129
138
  if args.debug:
130
139
  import traceback
@@ -16,7 +16,7 @@ def respond(messages, instructions, **kwargs):
16
16
  """
17
17
  api_key = environ.get("DEPSEK_API_KEY")
18
18
  api_base = environ.get("DEPSEK_API_BASE", "https://api.deepseek.com")
19
- default_model = environ.get("DEPSEK_DEFAULT_MODEL", "deepseek-reasoner")
19
+ default_model = environ.get("DEPSEK_DEFAULT_MODEL", "deepseek-v4-pro")
20
20
 
21
21
  instruction = kwargs.get('system_instruction', instructions)
22
22
  first_message = [dict(role='system', content=instruction)] if instruction else []
@@ -31,6 +31,7 @@ def respond(messages, instructions, **kwargs):
31
31
  "messages": instruction_and_contents,
32
32
  "max_tokens": kwargs.get("max_tokens", 32000),
33
33
  "temperature": kwargs.get("temperature", 1.0),
34
+ "reasoning_effort": kwargs.get("reasoning_effort", "max"),
34
35
  "thinking": {
35
36
  "type": "enabled"
36
37
  }
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thinking-machine
3
- Version: 0.0.26
4
- Summary: Thinking-Machine does thinking.
3
+ Version: 0.1.1
4
+ Summary: Thinking-Machine ...
5
5
  Author-email: Machina Ratiocinatrix <machina.ratio@gmail.com>, Alexander Fedotov <alex.fedotov@aol.com>
6
6
  Project-URL: Homepage, https://github.com/machina-ratiocinatrix/thinking-machine
7
7
  Keywords: thinking-machine
@@ -36,37 +36,15 @@ export GITHUB_TOKEN="ghp_..."
36
36
  ```
37
37
  Then:
38
38
  ```bash
39
- thinking-machine multilogue.txt
39
+ thinking-machine -a multilogue.txt
40
40
  ```
41
41
  Or:
42
42
  ```bash
43
- thinking-machine multilogue.txt new_turn.txt
43
+ thinking-machine multilogue.txt > response.txt
44
44
  ```
45
45
  Or:
46
46
  ```bash
47
- cat multilogue.txt | thinking-machine
48
- ```
49
- Or:
50
- ```bash
51
- cat multilogue.txt | thinking-machine > tmp && mv tmp 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 > tmp && mv tmp 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
47
+ thinking-machine -a multilogue.txt > tmp && echo tmp > multilogue.txt
70
48
  ```
71
49
 
72
50
  Or use it in your Python code:
@@ -1,60 +0,0 @@
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 a 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 > tmp && mv tmp 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 > tmp && mv tmp 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
- ```