LangChainGo / app.py
lizhen
fix
7d16c91
raw
history blame
433 Bytes
import gradio as gr
from langchain.llms import OpenAI
def chatOpenAI(input):
llm = OpenAI(temperature=0.9)
return llm(input)
with gr.Blocks() as demo:
gr.Markdown(
'''
# LangChain Test
LLM跑步上车。
LangChain进度:
    2023/4/15,接入openAI,简单测试。
''')
gr.Interface(fn=chatOpenAI, inputs="text", outputs="text")
demo.launch()