File tree Expand file tree Collapse file tree 4 files changed +24
-9
lines changed Expand file tree Collapse file tree 4 files changed +24
-9
lines changed Original file line number Diff line number Diff line change @@ -101,13 +101,19 @@ pip install chinoai
101
101
```
102
102
103
103
- ** Install the Project (from source)** :
104
- -
104
+
105
105
Use PDM to run the project:
106
106
107
107
``` bash
108
108
python3 -m pip install -e .
109
109
```
110
110
111
+ - ** Install pre-commit hooks** :
112
+
113
+ ``` bash
114
+ pre-commit install
115
+ ```
116
+
111
117
- ** Run the project:**
112
118
113
119
``` bash
Original file line number Diff line number Diff line change 1
1
[project ]
2
2
name = " chinoai"
3
- version = " 0.1 .0"
3
+ version = " 1.0 .0"
4
4
description = " Chino is a terminal based chatbot based on ChatGPT."
5
5
authors = [
6
6
{
name =
" Sam" ,
email =
" [email protected] " },
@@ -47,4 +47,4 @@ push = false
47
47
48
48
[tool .bumpver .file_patterns ]
49
49
"pyproject.toml" = [' current_version = "{version}"' , ' version = "{version}"' ]
50
- "src/reader /__init__.py" = [" {version}" ]
50
+ "src/chino /__init__.py" = [" {version}" ]
Original file line number Diff line number Diff line change 7
7
except ModuleNotFoundError :
8
8
import tomli as tomllib
9
9
10
- __version__ = "0.1 .0"
10
+ __version__ = "1.0 .0"
Original file line number Diff line number Diff line change 1
1
import os
2
+ import typer
2
3
3
- from typer import Typer
4
+ from typer import Typer , Context , Option
4
5
5
6
from .conversation import Conversation
6
7
from .migrations import Migration
7
8
8
9
from .utils import fancy_print
9
10
11
+ from chino import __version__
12
+
13
+
10
14
app : Typer = Typer (
11
- help = "Chino is a chatbot based on OpenAI. It can also provide responses about queries on user-provided data."
15
+ help = "Chino is a chatbot based on OpenAI. It can also provide responses about queries on user-provided data." ,
12
16
)
13
17
14
18
@@ -23,10 +27,9 @@ def migrate(
23
27
migration .generate_data_store ()
24
28
25
29
26
- @app .command ("start" )
27
- def main () -> None :
30
+ @app .command ()
31
+ def start () -> None :
28
32
"""Start the main event loop function. A chat interface will be opened."""
29
-
30
33
conv : Conversation = Conversation ()
31
34
try :
32
35
while True :
@@ -40,3 +43,9 @@ def main() -> None:
40
43
fancy_print (conv .console , conv .get_response (prompt ).content )
41
44
except KeyboardInterrupt :
42
45
conv .console .print ("\n [bold red]Quiting...[/bold red]" )
46
+
47
+
48
+ @app .command ()
49
+ def version () -> None :
50
+ """Print the version of the chino package."""
51
+ typer .echo (f"Chino { __version__ } " )
You can’t perform that action at this time.
0 commit comments