Skip to content

Commit

Permalink
Update langchain.py
Browse files Browse the repository at this point in the history
  • Loading branch information
toandaominh1997 authored Dec 1, 2024
1 parent 2bc2309 commit 86c5a77
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions langchain.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
from typing import List, Union, Generator, Iterator
import os
from langchain_core.prompts import ChatPromptTemplate
from langchain_ollama.llms import OllamaLLM
import pip


class Pipeline:
def __init__(self):
self.index = 0

async def on_startup(self):
pip.main(['install', "langchain"])
pip.main(['install', "langchain-ollama"])
from langchain_core.prompts import ChatPromptTemplate
from langchain_ollama.llms import OllamaLLM
# This function is called when the server is started.
template = """Question: {question}
Expand Down

0 comments on commit 86c5a77

Please sign in to comment.