commandchat 0.0.5__tar.gz → 0.0.6__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 (24) hide show
  1. {commandchat-0.0.5 → commandchat-0.0.6}/PKG-INFO +1 -1
  2. {commandchat-0.0.5 → commandchat-0.0.6}/commandchat.egg-info/PKG-INFO +1 -1
  3. {commandchat-0.0.5 → commandchat-0.0.6}/occ/CommandChat.py +2 -2
  4. {commandchat-0.0.5 → commandchat-0.0.6}/occ/command/__main__.py +7 -5
  5. {commandchat-0.0.5 → commandchat-0.0.6}/pyproject.toml +1 -1
  6. {commandchat-0.0.5 → commandchat-0.0.6}/LICENSE +0 -0
  7. {commandchat-0.0.5 → commandchat-0.0.6}/README.md +0 -0
  8. {commandchat-0.0.5 → commandchat-0.0.6}/commandchat.egg-info/SOURCES.txt +0 -0
  9. {commandchat-0.0.5 → commandchat-0.0.6}/commandchat.egg-info/dependency_links.txt +0 -0
  10. {commandchat-0.0.5 → commandchat-0.0.6}/commandchat.egg-info/entry_points.txt +0 -0
  11. {commandchat-0.0.5 → commandchat-0.0.6}/commandchat.egg-info/requires.txt +0 -0
  12. {commandchat-0.0.5 → commandchat-0.0.6}/commandchat.egg-info/top_level.txt +0 -0
  13. {commandchat-0.0.5 → commandchat-0.0.6}/occ/ConvertLogToMarkDown.py +0 -0
  14. {commandchat-0.0.5 → commandchat-0.0.6}/occ/__init__.py +0 -0
  15. {commandchat-0.0.5 → commandchat-0.0.6}/occ/command/__init__.py +0 -0
  16. {commandchat-0.0.5 → commandchat-0.0.6}/occ/commons/__init__.py +0 -0
  17. {commandchat-0.0.5 → commandchat-0.0.6}/occ/commons/config.py +0 -0
  18. {commandchat-0.0.5 → commandchat-0.0.6}/occ/configuration/__init__.py +0 -0
  19. {commandchat-0.0.5 → commandchat-0.0.6}/occ/configuration/profile_config.py +0 -0
  20. {commandchat-0.0.5 → commandchat-0.0.6}/occ/utils/CommonUtil.py +0 -0
  21. {commandchat-0.0.5 → commandchat-0.0.6}/occ/utils/__init__.py +0 -0
  22. {commandchat-0.0.5 → commandchat-0.0.6}/occ/utils/logger.py +0 -0
  23. {commandchat-0.0.5 → commandchat-0.0.6}/setup.cfg +0 -0
  24. {commandchat-0.0.5 → commandchat-0.0.6}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: commandchat
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: use command to chat with openai models
5
5
  Home-page: https://github.com/
6
6
  Author: xoto
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: commandchat
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: use command to chat with openai models
5
5
  Home-page: https://github.com/
6
6
  Author: xoto
@@ -64,14 +64,14 @@ class CommandChat:
64
64
  print(e.http_status)
65
65
  print(e.error)
66
66
 
67
- def chat(self, message):
67
+ def chat(self, message, model):
68
68
  openai.api_key = self.api_key
69
69
  openai.api_base = self.api_base
70
70
  message = {"role": "user", "content": message}
71
71
  self.messages.append(message)
72
72
  waiting_start()
73
73
  response = self.client.chat.completions.create(
74
- model="o1-mini",
74
+ model=model,
75
75
  messages=self.messages,
76
76
  temperature=1,
77
77
  top_p=1,
@@ -18,7 +18,7 @@ def commandchat_operator():
18
18
 
19
19
 
20
20
  @click.command()
21
- @click.option('-profile', help='Enable profile name')
21
+ @click.option('--profile', '-p', help='Enable profile name')
22
22
  def configure(profile):
23
23
  if profile is not None:
24
24
  add_profile(profile)
@@ -29,10 +29,11 @@ def configure(profile):
29
29
  @click.command()
30
30
  @click.argument('message')
31
31
  @click.option('-id', help=' enter chat id, something like context')
32
- @click.option('-profile', help='Enable profile name')
33
- def chat(message, id, profile):
32
+ @click.option('--profile', '-p', help='Enable profile name')
33
+ @click.option("--model", "-m", envvar="OCC_MODEL", default="o1-mini", help="Specify the model to use for this chat session")
34
+ def chat(message, id, profile, model):
34
35
  try:
35
- CommandChat(profile=profile, chat_log_id=id).chat(message)
36
+ CommandChat(profile=profile, chat_log_id=id).chat(message, model)
36
37
  except Exception as e:
37
38
  logger.log_g(str(e))
38
39
  waiting_stop()
@@ -69,5 +70,6 @@ commandchat_operator.add_command(image)
69
70
  def main():
70
71
  commandchat_operator()
71
72
 
73
+
72
74
  if __name__ == '__main__':
73
- main()
75
+ main()
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "commandchat"
7
- version = "0.0.5"
7
+ version = "0.0.6"
8
8
  description = "use command to chat with openai models"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
File without changes
File without changes
File without changes
File without changes
File without changes