This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CustomAgent(Agent): | |
# Post-Processing Pipeline | |
def __init__(self, **kwargs): | |
super().__init__(**kwargs) | |
def add_post_processing_pipeline(self, pipeline): | |
self.post_processing_pipeline = pipeline | |
self.callback_manager.on_agent_finish += self.on_result_post_process |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import sys | |
import threading | |
from typing import Any | |
import json | |
import os | |
import logging | |
from fastapi import FastAPI, WebSocket, BackgroundTasks, WebSocketDisconnect | |
from fastapi.responses import HTMLResponse | |
from functools import partial |
OlderNewer