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.
- {hcli_hai-1.2.0/hcli_hai.egg-info → hcli_hai-1.3.0}/PKG-INFO +1 -1
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__pycache__/ai.cpython-311.pyc +0 -0
- hcli_hai-1.3.0/hcli_hai/cli/__pycache__/cli.cpython-311.pyc +0 -0
- hcli_hai-1.3.0/hcli_hai/cli/__pycache__/model.cpython-311.pyc +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/ai.py +4 -4
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/cli.py +2 -3
- hcli_hai-1.2.0/hcli_hai/cli/instance.py → hcli_hai-1.3.0/hcli_hai/cli/model.py +11 -5
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/package.py +1 -1
- {hcli_hai-1.2.0 → hcli_hai-1.3.0/hcli_hai.egg-info}/PKG-INFO +1 -1
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai.egg-info/SOURCES.txt +2 -2
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/tests/test_hai.py +1 -1
- hcli_hai-1.2.0/hcli_hai/cli/__pycache__/cli.cpython-311.pyc +0 -0
- hcli_hai-1.2.0/hcli_hai/cli/__pycache__/instance.cpython-311.pyc +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/LICENSE.txt +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/MANIFEST.in +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/README.rst +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/__init__.py +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/__main__.py +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__init__.py +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__pycache__/config.cpython-311.pyc +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__pycache__/context.cpython-311.pyc +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__pycache__/hutils.cpython-311.pyc +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/__pycache__/logger.cpython-311.pyc +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/config.py +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/context.py +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/hutils.py +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/logger.py +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/cli/template.json +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/config.py +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/data/hcli_hai.1 +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai/hutils.py +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai.egg-info/dependency_links.txt +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai.egg-info/entry_points.txt +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai.egg-info/requires.txt +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/hcli_hai.egg-info/top_level.txt +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/pyproject.toml +0 -0
- {hcli_hai-1.2.0 → hcli_hai-1.3.0}/requirements.txt +0 -0
- {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.
|
|
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
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,7 +5,7 @@ import sys
|
|
|
5
5
|
import inspect
|
|
6
6
|
import traceback
|
|
7
7
|
import logger
|
|
8
|
-
import
|
|
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
|
-
# **
|
|
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
|
-
**
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
12
|
-
'model' : "claude-3-
|
|
11
|
+
claude_3_opus_20240229 = {
|
|
12
|
+
'model' : "claude-3-opus-20240229",
|
|
13
13
|
'max_tokens' : 2048
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
'model' : "claude-3-
|
|
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,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hcli_hai
|
|
3
|
-
Version: 1.
|
|
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
|
|
Binary file
|
|
Binary file
|
|
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
|
|
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
|
|
File without changes
|