New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ollama support? #1365
Comments
This should be easy: Cheers! |
Import the Ollama class from langchain.llmsfrom langchain.llms import Ollama Create an instance of the Ollama class with specified parametersollama = Ollama(base_url='http://localhost:11434', model="llama2") Define the prompt you want to send to the Ollama modelprompt = "Your prompt goes here" Make a request to the Ollama model with the provided promptresponse = ollama(prompt) Print the response from the Ollama modelprint(response) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there any way to use Ollama to host the llm models?
The text was updated successfully, but these errors were encountered: