[Improvement] Fix deprecation warnings (#1288)

This commit is contained in:
Deshraj Yadav
2024-02-27 15:10:41 -08:00
committed by GitHub
parent 56bf33ab7f
commit 09cdaff9a2
12 changed files with 13 additions and 47 deletions

View File

@@ -56,7 +56,7 @@ def generate(rq: queue.Queue):
```
def askQuestion(callback_fn: StreamingStdOutCallbackHandlerYield):
llm = OpenAI(streaming=True, callbacks=[callback_fn])
return llm(prompt="Write a poem about a tree.")
return llm.invoke(prompt="Write a poem about a tree.")
@app.route("/", methods=["GET"])
def generate_output():