0.6.14
that changed how prompt_helper is used? prompt_helper = PromptHelper.from_llm_predictor(llm_predictor=llm_predictor, chunk_size_limit=1024)
0.6.14
and kept langchain version 0.0.205
, but then choosing the newer gpt-3.5-turbo-16k
model gives error:[ERROR] ValueError: Unknown model: gpt-3.5-turbo-16k. Please provide a valid OpenAI model name.Known models are: gpt-4, gpt-4-0314, gpt-4-32k, gpt-4-32k-0314, gpt-3.5-turbo, gpt-3.5-turbo-0301, text-ada-001, ada, text-babbage-001, babbage, text-curie-001, curie, davinci, text-davinci-003, text-davinci-002, code-davinci-002, code-davinci-001, code-cushman-002, code-cushman-001
gpt-3.5-turbo
model suddenly gives me error nltk package not found, please run pip install nltk
- even though nltk is the first item on the requirements.txt
file for my project - Im confusedimport nltk nltk.data.path.append('/tmp/nltk_data')
nltk.download('punkt', download_dir='/tmp/nltk_data')
type object 'PromptHelper' has no attribute 'from_llm_predictor'
ServiceContext.from_defaults(..., chunk_size=1024)
TokenTextSplitter(chunk_size=400, chunk_overlap=50)
/tmp
/home
but in AWS Lmabda its default to only have /tmp
as a writable folder./home
entries into /tmp
entries in all kinds of different files is a good solution to thisos.environ["NLTK_DATA"] = '/tmp/nltk_data'
but the logs still show : [nltk_data] Downloading package stopwords to [nltk_data] /home/sbx_user1051/nltk_data... Error generating response: [Errno 30] Read-only file system: "/home/sbx_user1051'
llama_index.indices.prompt_helper import PromptHelper
which calls for from llama_index.utils import globals_helper
_stopwords: Optional[List[str]] = None
and then later below: def stopwords(self) -> List[str]: """Get stopwords.""" if self._stopwords is None: try: import nltk from nltk.corpus import stopwords except ImportError: raise ImportError( "`nltk` package not found, please run `pip install nltk`" ) try: nltk.data.find("corpora/stopwords") except LookupError: nltk.download("stopwords") self._stopwords = stopwords.words("english") return self._stopwords
globals_helper = GlobalsHelper()
followed by another def: get_new_id(d: Set) -> str:
....nltk.download("stopwords")
nltk.download('stopwords',download_dir='/tmp')
but I dont have a way to edit utils.py with lambda, only my bots py file, all the rest are dependencies_stopwords: Optional[List[str]] = None
so it will overwrite my listnltk.download("stopwords")
to nltk.download("stopwords", download_dir='{NLTK_DATA}')
could do the trick