hcli-hai 1.2.0__tar.gz → 1.3.0__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 (38) hide show
  1. {hcli_hai-1.2.0/hcli_hai.egg-info → hcli_hai-1.3.0}/PKG-INFO +1 -1
  2. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__pycache__/ai.cpython-311.pyc +0 -0
  3. hcli_hai-1.3.0/hcli_hai/cli/__pycache__/cli.cpython-311.pyc +0 -0
  4. hcli_hai-1.3.0/hcli_hai/cli/__pycache__/model.cpython-311.pyc +0 -0
  5. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/ai.py +4 -4
  6. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/cli.py +2 -3
  7. hcli_hai-1.2.0/hcli_hai/cli/instance.py → hcli_hai-1.3.0/hcli_hai/cli/model.py +11 -5
  8. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/package.py +1 -1
  9. {hcli_hai-1.2.0 → hcli_hai-1.3.0/hcli_hai.egg-info}/PKG-INFO +1 -1
  10. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai.egg-info/SOURCES.txt +2 -2
  11. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/tests/test_hai.py +1 -1
  12. hcli_hai-1.2.0/hcli_hai/cli/__pycache__/cli.cpython-311.pyc +0 -0
  13. hcli_hai-1.2.0/hcli_hai/cli/__pycache__/instance.cpython-311.pyc +0 -0
  14. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/LICENSE.txt +0 -0
  15. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/MANIFEST.in +0 -0
  16. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/README.rst +0 -0
  17. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/__init__.py +0 -0
  18. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/__main__.py +0 -0
  19. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__init__.py +0 -0
  20. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__pycache__/config.cpython-311.pyc +0 -0
  21. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__pycache__/context.cpython-311.pyc +0 -0
  22. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__pycache__/hutils.cpython-311.pyc +0 -0
  23. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__pycache__/logger.cpython-311.pyc +0 -0
  24. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/config.py +0 -0
  25. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/context.py +0 -0
  26. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/hutils.py +0 -0
  27. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/logger.py +0 -0
  28. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/template.json +0 -0
  29. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/config.py +0 -0
  30. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/data/hcli_hai.1 +0 -0
  31. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/hutils.py +0 -0
  32. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai.egg-info/dependency_links.txt +0 -0
  33. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai.egg-info/entry_points.txt +0 -0
  34. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai.egg-info/requires.txt +0 -0
  35. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai.egg-info/top_level.txt +0 -0
  36. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/pyproject.toml +0 -0
  37. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/requirements.txt +0 -0
  38. {hcli_hai-1.2.0 → hcli_hai-1.3.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hcli_hai
3
- Version: 1.2.0
3
+ Version: 1.3.0
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
5
  Author-email: Jeff Michaud <cometaj2@comcast.net>
6
6
  License: MIT
@@ -5,7 +5,7 @@ import sys
5
5
  import inspect
6
6
  import traceback
7
7
  import logger
8
- import instance
8
+ import model
9
9
  import config
10
10
  import context
11
11
  import config
@@ -38,7 +38,7 @@ class AI:
38
38
  try:
39
39
  #client = OpenAI(api_key=os.environ['OPENAI_API_KEY'])
40
40
  #response = client.chat.completions.create(
41
- # **instance.openai_baseline,
41
+ # **model.openai_baseline,
42
42
  # messages=self.context
43
43
  # )
44
44
  client = Anthropic(api_key=os.environ.get("ANTHROPIC_API_KEY"))
@@ -48,7 +48,7 @@ class AI:
48
48
  user_messages = [msg for msg in self.context.messages() if msg["role"] != "system"]
49
49
 
50
50
  response = client.messages.create(
51
- **instance.anthropic_claude_3_5_sonnet,
51
+ **model.claude_3_5_sonnet_20240620,
52
52
  system=system_message,
53
53
  messages=user_messages
54
54
  )
@@ -150,7 +150,7 @@ class AI:
150
150
  self.config.init()
151
151
  self.context.init()
152
152
 
153
- return None
153
+ return self.current()
154
154
 
155
155
  def rm(self, id):
156
156
  context_folder = os.path.join(self.config.dot_hai_context, id)
@@ -6,7 +6,6 @@ import inspect
6
6
  import traceback
7
7
  import tiktoken
8
8
  import logger
9
- import instance
10
9
  import ai
11
10
 
12
11
  from openai import OpenAI
@@ -47,8 +46,8 @@ class CLI:
47
46
  return io.BytesIO(json.dumps(contexts, indent=4).encode('utf-8') + "\n".encode('utf-8'))
48
47
 
49
48
  if self.commands[1] == "new":
50
- self.ai.new()
51
- return
49
+ current = self.ai.new()
50
+ return io.BytesIO(current.encode('utf-8') + "\n".encode('utf-8'))
52
51
 
53
52
  if self.commands[1] == "current":
54
53
  current = self.ai.current()
@@ -1,4 +1,4 @@
1
- openai_gpt_3_5_turbo = {
1
+ gpt_3_5_turbo = {
2
2
  'model' : "gpt-3.5-turbo",
3
3
  'temperature' : 0.7,
4
4
  'max_tokens' : 2048,
@@ -8,12 +8,18 @@ openai_gpt_3_5_turbo = {
8
8
  'presence_penalty' : 0.5
9
9
  }
10
10
 
11
- anthropic_claude_3_5_sonnet = {
12
- 'model' : "claude-3-5-sonnet-20240620",
11
+ claude_3_opus_20240229 = {
12
+ 'model' : "claude-3-opus-20240229",
13
13
  'max_tokens' : 2048
14
14
  }
15
15
 
16
- anthropic_claude_3_opus = {
17
- 'model' : "claude-3-opus-20240229",
16
+ claude_3_haiku_20240307 = {
17
+ 'model' : "claude-3-haiku-20240307",
18
+ 'max_tokens' : 2048
19
+ }
20
+
21
+ claude_3_5_sonnet_20240620 = {
22
+ 'model' : "claude-3-5-sonnet-20240620",
18
23
  'max_tokens' : 2048
19
24
  }
25
+
@@ -1,4 +1,4 @@
1
- __version__ = "1.2.0"
1
+ __version__ = "1.3.0"
2
2
  dependencies = ["openai==1.7.0",
3
3
  "tiktoken==0.5.2",
4
4
  "anthropic==0.34.2",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hcli_hai
3
- Version: 1.2.0
3
+ Version: 1.3.0
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
5
  Author-email: Jeff Michaud <cometaj2@comcast.net>
6
6
  License: MIT
@@ -21,15 +21,15 @@ hcli_hai/cli/cli.py
21
21
  hcli_hai/cli/config.py
22
22
  hcli_hai/cli/context.py
23
23
  hcli_hai/cli/hutils.py
24
- hcli_hai/cli/instance.py
25
24
  hcli_hai/cli/logger.py
25
+ hcli_hai/cli/model.py
26
26
  hcli_hai/cli/template.json
27
27
  hcli_hai/cli/__pycache__/ai.cpython-311.pyc
28
28
  hcli_hai/cli/__pycache__/cli.cpython-311.pyc
29
29
  hcli_hai/cli/__pycache__/config.cpython-311.pyc
30
30
  hcli_hai/cli/__pycache__/context.cpython-311.pyc
31
31
  hcli_hai/cli/__pycache__/hutils.cpython-311.pyc
32
- hcli_hai/cli/__pycache__/instance.cpython-311.pyc
33
32
  hcli_hai/cli/__pycache__/logger.cpython-311.pyc
33
+ hcli_hai/cli/__pycache__/model.cpython-311.pyc
34
34
  hcli_hai/data/hcli_hai.1
35
35
  tests/test_hai.py
@@ -20,7 +20,7 @@ def test_function():
20
20
  set -x
21
21
 
22
22
  export PATH=$PATH:~/.huckle/bin
23
- hai new
23
+ hai new > /dev/null 2>&1
24
24
  hai context
25
25
  kill $(ps aux | grep '[g]unicorn' | awk '{print $2}')
26
26
  """
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