Remove extra main.py

This commit is contained in:
2026-05-27 10:03:13 +00:00
parent e0632eea16
commit 3e25613f8f
-19
View File
@@ -1,19 +0,0 @@
from langchain import LLMChain, PromptTemplate
from langchain_openai import OpenAI
def main():
template = """
You are a helpful assistant.
Question: {question}
Answer:"""
prompt = PromptTemplate(template=template, input_variables=["question"])
llm = OpenAI(api_key="YOUR_API_KEY", temperature=0.7)
chain = LLMChain(llm=llm, prompt=prompt)
while True:
q = input("Ask a question (or 'exit'): ")
if q.lower() in {"exit", "quit"}:
break
print(chain.run({"question": q}))
if __name__ == "__main__":
main()