mirror of
https://github.com/lightbroker/llmsecops-research.git
synced 2026-05-15 13:38:01 +02:00
LangChain WIP; missing arg
This commit is contained in:
@@ -30,5 +30,5 @@ jobs:
|
||||
pip install langchain_text_splitters
|
||||
pip install langchain_huggingface
|
||||
pip install transformers
|
||||
python -m tests.llm.llm
|
||||
python -m tests.llm.llm --prompt "What is the capital of France?"
|
||||
|
||||
|
||||
+3
-6
@@ -1,7 +1,6 @@
|
||||
import argparse
|
||||
import os
|
||||
from langchain_core.output_parsers import StrOutputParser
|
||||
from langchain_core.runnables import RunnablePassthrough
|
||||
|
||||
from langchain_community.document_loaders import WebBaseLoader
|
||||
from langchain_community.vectorstores import FAISS
|
||||
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
||||
@@ -37,10 +36,8 @@ class Llm:
|
||||
|
||||
def get_response(self, input):
|
||||
# Use the model
|
||||
print(input)
|
||||
canned_input = "What is the capital of France?"
|
||||
print(canned_input)
|
||||
response = self.hf_model.invoke(canned_input)
|
||||
print(f'End user prompt: {input}')
|
||||
response = self.hf_model.invoke(input)
|
||||
print(response)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user