hcli-hai 3.0.0__tar.gz → 3.0.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. {hcli_hai-3.0.0/hcli_hai.egg-info → hcli_hai-3.0.1}/PKG-INFO +3 -3
  2. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/package.py +1 -1
  3. {hcli_hai-3.0.0 → hcli_hai-3.0.1/hcli_hai.egg-info}/PKG-INFO +3 -3
  4. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/pyproject.toml +2 -2
  5. hcli_hai-3.0.1/tests/test_hai.py +41 -0
  6. hcli_hai-3.0.0/tests/test_hai.py +0 -60
  7. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/LICENSE.txt +0 -0
  8. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/MANIFEST.in +0 -0
  9. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/README.rst +0 -0
  10. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/__init__.py +0 -0
  11. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/__main__.py +0 -0
  12. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/cli/__init__.py +0 -0
  13. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/cli/ai.py +0 -0
  14. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/cli/cli.py +0 -0
  15. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/cli/config.py +0 -0
  16. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/cli/context.py +0 -0
  17. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/cli/logger.py +0 -0
  18. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/cli/model.py +0 -0
  19. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/cli/template.json +0 -0
  20. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/cli/utils/formatting.py +0 -0
  21. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/cli/utils/hutils.py +0 -0
  22. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/cli/utils/summary.py +0 -0
  23. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/config.py +0 -0
  24. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/data/hcli_hai.1 +0 -0
  25. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai/hutils.py +0 -0
  26. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai.egg-info/SOURCES.txt +0 -0
  27. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai.egg-info/dependency_links.txt +0 -0
  28. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai.egg-info/entry_points.txt +0 -0
  29. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai.egg-info/requires.txt +0 -0
  30. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/hcli_hai.egg-info/top_level.txt +0 -0
  31. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/requirements.txt +0 -0
  32. {hcli_hai-3.0.0 → hcli_hai-3.0.1}/setup.cfg +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: hcli_hai
3
- Version: 3.0.0
3
+ Version: 3.0.1
4
4
  Summary: HCLI hai is a python package wrapper that contains an HCLI sample application (hai); hai is an HCLI for interacting with Anthropic's Claude or OpenAI's GPT AI models via terminal input and output streams.
5
- Author-email: Jeff Michaud <cometaj2@comcast.net>
5
+ Author-email: Jeff Michaud <cometaj2@proton.me>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/cometaj2/hcli_hai
8
- Keywords: cli,client,server,connector,hypermedia,rest,generic,development
8
+ Keywords: ai,llm,cli,client,server,connector,hypermedia,rest,generic,development
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Intended Audience :: Developers
11
11
  Classifier: Topic :: Software Development
@@ -1,3 +1,3 @@
1
- __version__ = "3.0.0"
1
+ __version__ = "3.0.1"
2
2
  dependencies = ["tiktoken==0.8.0",
3
3
  "anthropic==0.36.2"]
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: hcli_hai
3
- Version: 3.0.0
3
+ Version: 3.0.1
4
4
  Summary: HCLI hai is a python package wrapper that contains an HCLI sample application (hai); hai is an HCLI for interacting with Anthropic's Claude or OpenAI's GPT AI models via terminal input and output streams.
5
- Author-email: Jeff Michaud <cometaj2@comcast.net>
5
+ Author-email: Jeff Michaud <cometaj2@proton.me>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/cometaj2/hcli_hai
8
- Keywords: cli,client,server,connector,hypermedia,rest,generic,development
8
+ Keywords: ai,llm,cli,client,server,connector,hypermedia,rest,generic,development
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Intended Audience :: Developers
11
11
  Classifier: Topic :: Software Development
@@ -7,7 +7,7 @@ name = "hcli_hai"
7
7
  dynamic = ["version", "dependencies"]
8
8
  description="HCLI hai is a python package wrapper that contains an HCLI sample application (hai); hai is an HCLI for interacting with Anthropic's Claude or OpenAI's GPT AI models via terminal input and output streams."
9
9
  readme = "README.rst"
10
- authors = [{name = "Jeff Michaud", email = "cometaj2@comcast.net"}]
10
+ authors = [{name = "Jeff Michaud", email = "cometaj2@proton.me"}]
11
11
  license = {text = "MIT"}
12
12
  classifiers = [
13
13
  "Development Status :: 4 - Beta",
@@ -18,7 +18,7 @@ classifiers = [
18
18
  "Programming Language :: Python :: 3.11",
19
19
  "Programming Language :: Python :: 3.12"
20
20
  ]
21
- keywords = ["cli", "client", "server", "connector", "hypermedia", "rest", "generic", "development"]
21
+ keywords = ["ai", "llm", "cli", "client", "server", "connector", "hypermedia", "rest", "generic", "development"]
22
22
 
23
23
  [project.urls]
24
24
  Homepage = "https://github.com/cometaj2/hcli_hai"
@@ -0,0 +1,41 @@
1
+ import subprocess
2
+ import os
3
+ import pytest
4
+
5
+ def test_hai_context(gunicorn_server, cleanup):
6
+ hello = """
7
+ #!/bin/bash
8
+ set -x
9
+
10
+ export HUCKLE_HOME=~/.huckle_test
11
+ eval $(huckle env)
12
+
13
+ hai new > /dev/null 2>&1
14
+ hai context --json
15
+ """
16
+
17
+ p2 = subprocess.Popen(['bash', '-c', hello], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
18
+ out, err = p2.communicate()
19
+ error = err.decode('utf-8')
20
+ result = out.decode('utf-8')
21
+
22
+ assert('{\n "messages": [\n {\n "content": "",\n "role": "system"\n }\n ],\n "name": "",\n "title": ""\n}\n' == result)
23
+
24
+ def test_hai_name(gunicorn_server, cleanup):
25
+ hello = """
26
+ #!/bin/bash
27
+ set -x
28
+
29
+ export HUCKLE_HOME=~/.huckle_test
30
+ eval $(huckle env)
31
+
32
+ hai name set hello
33
+ hai name
34
+ """
35
+
36
+ p3 = subprocess.Popen(['bash', '-c', hello], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
37
+ out, err = p3.communicate()
38
+ error = err.decode('utf-8')
39
+ result = out.decode('utf-8')
40
+
41
+ assert('hello\n' == result)
@@ -1,60 +0,0 @@
1
- import subprocess
2
- import os
3
-
4
- def test_hai_context():
5
- setup = """
6
- #!/bin/bash
7
- set -x
8
-
9
- gunicorn --workers=1 --threads=1 "hcli_core:connector(\\"`hcli_hai path`\\")" --error-log ./error.log --daemon
10
- sleep 3
11
- huckle cli install http://127.0.0.1:8000
12
-
13
- cat ./error.log
14
- """
15
-
16
- p1 = subprocess.Popen(['bash', '-c', setup], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
17
- out, err = p1.communicate()
18
-
19
- error = err.decode('utf-8')
20
- result = out.decode('utf-8')
21
- print(error)
22
- print(result)
23
-
24
- hello = """
25
- #!/bin/bash
26
- set -x
27
-
28
- eval $(huckle env)
29
- hai new > /dev/null 2>&1
30
- hai context
31
- """
32
-
33
- p2 = subprocess.Popen(['bash', '-c', hello], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
34
- out, err = p2.communicate()
35
- error = err.decode('utf-8')
36
- result = out.decode('utf-8')
37
- print(error)
38
- print(result)
39
-
40
- assert(result == '{\n "messages": [\n {\n "content": "",\n "role": "system"\n }\n ],\n "name": "",\n "title": ""\n}')
41
-
42
- def test_hai_name():
43
- hello = """
44
- #!/bin/bash
45
- set -x
46
-
47
- eval $(huckle env)
48
- hai name set hello
49
- hai name
50
- ps aux | grep '[g]unicorn' | awk '{print $2}' | xargs kill
51
- """
52
-
53
- p3 = subprocess.Popen(['bash', '-c', hello], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
54
- out, err = p3.communicate()
55
- error = err.decode('utf-8')
56
- result = out.decode('utf-8')
57
- print(error)
58
- print(result)
59
-
60
- assert(result == 'hello')
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes