File tree 2 files changed +7
-4
lines changed
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 5
5
6
6
setuptools .setup (
7
7
name = "text2text" ,
8
- version = "1.6.0 " ,
8
+ version = "1.6.1 " ,
9
9
author = "artitw" ,
10
10
author_email = "artitw@gmail.com" ,
11
11
description = "Text2Text: Crosslingual NLP/G toolkit" ,
Original file line number Diff line number Diff line change 9
9
from llama_index .core .llms import ChatMessage
10
10
11
11
def ollama_version ():
12
- result = subprocess .check_output (["ollama" , "-v" ], stderr = subprocess .STDOUT ).decode ("utf-8" )
13
- if result .startswith ("ollama version " ):
14
- return result .replace ("ollama version " , "" )
12
+ try :
13
+ result = subprocess .check_output (["ollama" , "-v" ], stderr = subprocess .STDOUT ).decode ("utf-8" )
14
+ if result .startswith ("ollama version " ):
15
+ return result .replace ("ollama version " , "" )
16
+ except Exception as e :
17
+ warnings .warn (str (e ))
15
18
return ""
16
19
17
20
class Assistant (object ):
You can’t perform that action at this time.
0 commit comments