Next issue is error:
llama_index/llms/langchain.py", line 111, in stream_complete
raise ValueError("LLM must support streaming.")
ValueError: LLM must support streaming.
Changed response LangChainLLM(llm=llm) and added stream_complete:
response=LangChainLLM(llm=llm)
response_gen = response.stream_complete("Hi this is")
for delta in response_gen:
print(delta.delta, end="")
Also added 'stream': True:
config = {'max_new_tokens': 100, 'gpu_layers': 50, 'stream': True}
Same error is seen in another script where im using chat_engine
Streaming should work for ctransformers afaik, I don't know what I am missing here, can't find anything else in the docs atm
Docs I checked:
https://python.langchain.com/docs/integrations/llms/ctransformershttps://docs.llamaindex.ai/en/stable/examples/llm/langchain.htmlhttps://github.com/marella/ctransformers#config