mirror of
https://github.com/pinecone-io/examples.git
synced 2023-10-11 20:04:54 +03:00
@@ -45,6 +45,9 @@ agent = initialize_agent(
|
||||
class AsyncCallbackHandler(AsyncIteratorCallbackHandler):
|
||||
content: str = ""
|
||||
final_answer: bool = False
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
|
||||
async def on_llm_new_token(self, token: str, **kwargs: Any) -> None:
|
||||
self.content += token
|
||||
@@ -101,4 +104,4 @@ if __name__ == "__main__":
|
||||
host="localhost",
|
||||
port=8000,
|
||||
reload=True
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user