commandchat 0.0.10__tar.gz → 0.0.11__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.
- {commandchat-0.0.10 → commandchat-0.0.11}/PKG-INFO +1 -1
- {commandchat-0.0.10 → commandchat-0.0.11}/commandchat.egg-info/PKG-INFO +1 -1
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/CommandChat.py +3 -4
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/command/__main__.py +0 -1
- {commandchat-0.0.10 → commandchat-0.0.11}/pyproject.toml +1 -1
- {commandchat-0.0.10 → commandchat-0.0.11}/LICENSE +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/README.md +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/commandchat.egg-info/SOURCES.txt +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/commandchat.egg-info/dependency_links.txt +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/commandchat.egg-info/entry_points.txt +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/commandchat.egg-info/requires.txt +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/commandchat.egg-info/top_level.txt +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/ConvertLogToMarkDown.py +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/__init__.py +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/command/__init__.py +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/commons/__init__.py +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/commons/config.py +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/configuration/__init__.py +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/configuration/profile_config.py +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/utils/CommonUtil.py +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/utils/__init__.py +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/occ/utils/logger.py +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/setup.cfg +0 -0
- {commandchat-0.0.10 → commandchat-0.0.11}/setup.py +0 -0
|
@@ -108,7 +108,7 @@ class CommandChat:
|
|
|
108
108
|
loop = asyncio.new_event_loop()
|
|
109
109
|
asyncio.set_event_loop(loop)
|
|
110
110
|
try:
|
|
111
|
-
final_text = loop.run_until_complete(self.
|
|
111
|
+
final_text = loop.run_until_complete(self.print_streaming(self.async_stream))
|
|
112
112
|
except KeyboardInterrupt:
|
|
113
113
|
final_text = None
|
|
114
114
|
finally:
|
|
@@ -119,7 +119,6 @@ class CommandChat:
|
|
|
119
119
|
sys.exit(0)
|
|
120
120
|
md = Markdown(final_text)
|
|
121
121
|
self.append_to_history(final_text)
|
|
122
|
-
console.clear()
|
|
123
122
|
console.print(md)
|
|
124
123
|
self.record_chat_logs(message, {"role": self.role, "content": final_text.replace("\n\n", "")})
|
|
125
124
|
|
|
@@ -139,7 +138,7 @@ class CommandChat:
|
|
|
139
138
|
await asyncio.sleep(0.01)
|
|
140
139
|
yield choice
|
|
141
140
|
|
|
142
|
-
async def
|
|
141
|
+
async def print_streaming(self, async_stream):
|
|
143
142
|
self.partial_text = []
|
|
144
143
|
text_area = TextArea(
|
|
145
144
|
text="",
|
|
@@ -208,4 +207,4 @@ class CommandChat:
|
|
|
208
207
|
|
|
209
208
|
if __name__ == '__main__':
|
|
210
209
|
command_chat = CommandChat()
|
|
211
|
-
command_chat.chat("帮我写一个python
|
|
210
|
+
command_chat.chat("帮我写一个python的冒泡排序算法", "o1-mini")
|
|
@@ -53,7 +53,6 @@ def chat(message, id, profile, model, file):
|
|
|
53
53
|
style=style_from_pygments_cls(TangoStyle), multiline=True, wrap_lines=True,
|
|
54
54
|
cursor=ModalCursorShapeConfig(),
|
|
55
55
|
)
|
|
56
|
-
print_formatted_text(HTML("<ansibrightwhite>AI model Terminal</ansibrightwhite>\n"))
|
|
57
56
|
while True:
|
|
58
57
|
try:
|
|
59
58
|
message = session.prompt("👤 You: \n")
|
|
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
|