private-gpt
private-gpt copied to clipboard
Syntax error model type
Running macOS Ventura getting this error match model_type: ^ SyntaxError: invalid syntax
Ah I just ran it and had the same error. macOS Ventura as well
Downgrading to python 3.10.1 now get a different error
from dotenv import load_dotenv ModuleNotFoundError: No module named 'dotenv'
Downgrading to python 3.10.1 now get a different error
from dotenv import load_dotenv ModuleNotFoundError: No module named 'dotenv'
use 'python -m pip install python-dotenv'
Running macOS Ventura getting this error match model_type: ^ SyntaxError: invalid syntax
you must use python 3.11 or newer versions, your python version must be older
Running macOS Ventura getting this error match model_type: ^ SyntaxError: invalid syntax
you must use python 3.11 or newer versions, your python version must be older
Just upgraded to 3.11.1 and now the error is other. No module langchain
Running macOS Ventura getting this error match model_type: ^ SyntaxError: invalid syntax
you must use python 3.11 or newer versions, your python version must be older
Just upgraded to 3.11.1 and now the error is other. No module langchain
then use python -m pip install langchain
exactly and paste it in terminal
I got the same Error but was able to go around it. The match model_type is simply a switch statement which is looking for your model type. By commenting out the match statement and just writing the code for the specific model you use, the error can be bypassed.
When using the default model:
# match model_type:
# case "LlamaCpp":
# llm = LlamaCpp(model_path=model_path, n_ctx=model_n_ctx, callbacks=callbacks, verbose=False)
# case "GPT4All":
# llm = GPT4All(model=model_path, n_ctx=model_n_ctx, backend='gptj', callbacks=callbacks, verbose=False)
# case _default:
# print(f"Model {model_type} not supported!")
# exit;
llm = GPT4All(model=model_path, n_ctx=model_n_ctx, backend='gptj', callbacks=callbacks, verbose=False)
Running macOS Ventura getting this error match model_type: ^ SyntaxError: invalid syntax
you must use python 3.11 or newer versions, your python version must be older
I am using 3.11.2 and I get this error.