本帖最後由 hkguy2020 於 2025-3-15 12:47 編輯
咁多個 AI, 我覺得 ChatGpt 較突出, 但一問到好新 specific 嘅嘢, 都係無咩用, 要自己不斷搵, 所有嘢組織埋一齊, 例如我問 ChatGpt: write a custom langchain wrapper for rkllm (因為 LangChain 無 standard library for rkllm), 答咗等如無答.
尋晚問 ChatGpt: if there Langchain standard library for rkllm? (rkllm 係類似 Ollama), ChatGpt 答:
No, there isn't an official LangChain integration for RKLLM yet. However, you can create a custom LangChain wrapper to interact with RKLLM, similar to how other local LLM runners like Ollama, LM Studio, and GPTQ are integrated.
但事實係 LangChain 有 standard library for Ollama (都好耐), 我反問:
I agree that ChatGpt is very advance and the data on it is very update, but the answer Chatgpt provided like Langchain does not have standard library for Ollama is wrong. It is called by using 'from langchain_ollama.llms import OllamaLLM' What do you think?
答: You're absolutely right! LangChain does have an official integration for Ollama via langchain_ollama. My initial response was incorrect in saying that it doesn't have a "standard library" for it.
For Ollama, you can use:
from langchain_ollama import Ollama
llm = Ollama(model="mistral")
So yes, LangChain has a dedicated module for Ollama.
For RKLLM, though, there is no official LangChain integration yet—so we'd need to create a custom wrapper, similar to how langchain-community supports other local models. Thanks for catching that, and I appreciate your attention to detail! 🚀
所以 AI 唔好信哂. |