mirror of
https://github.com/kennethreitz/simplechat.git
synced 2026-06-05 23:00:17 +00:00
Refactor Simplechat CLI: Update version to 0.1.8 in pyproject.toml
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "simplemind-chat"
|
||||
version = "0.1.6"
|
||||
version = "0.1.8"
|
||||
description = "A chat interface for AI models using Simplemind."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11"
|
||||
|
||||
+4
-17
@@ -1,8 +1,7 @@
|
||||
import docopt
|
||||
import re
|
||||
import sys
|
||||
import subprocess
|
||||
from typing import Any
|
||||
|
||||
import spacy
|
||||
import nltk
|
||||
from spacy.cli import download
|
||||
@@ -109,15 +108,10 @@ class Simplechat:
|
||||
self.conversation.add_plugin(plugin())
|
||||
|
||||
def send(self, message: str) -> Any:
|
||||
# First, ensure the message is added to the conversation
|
||||
self.conversation.add_message(role="user", text=message)
|
||||
with console.status("[yellow]Thinking...[/yellow]"):
|
||||
response = self.conversation.send(message)
|
||||
|
||||
progress = Progress(
|
||||
SpinnerColumn(), TextColumn("[yellow]Thinking..."), transient=True
|
||||
)
|
||||
with progress:
|
||||
progress.add_task("", total=None)
|
||||
response = self.conversation.send()
|
||||
return response
|
||||
|
||||
@property
|
||||
@@ -260,14 +254,7 @@ class Simplechat:
|
||||
+ memories
|
||||
)
|
||||
|
||||
progress = Progress(
|
||||
SpinnerColumn(),
|
||||
TextColumn("[yellow]Summarizing memories..."),
|
||||
transient=True,
|
||||
)
|
||||
with progress:
|
||||
progress.add_task("", total=None)
|
||||
summary_response = self.send(summary_prompt)
|
||||
summary_response = self.send(summary_prompt)
|
||||
|
||||
console.print("\n[bold blue]Raw Memories:[/bold blue]")
|
||||
console.print(Markdown(memories))
|
||||
|
||||
Reference in New Issue
Block a user