一、openai文件检索
https://platform.openai.com/docs/assistants/tools/file-search?context=streaming
二、示例
from typing_extensions import override
from openai import OpenAI
from openai import AssistantEventHandler
import os
os.environ["http_proxy"] = "http://localhost:7890"
os.environ["https_proxy"] = "http://localhost:7890"
class EventHandler(AssistantEventHandler):
@override
def on_text_created(self, text) -> None:
print(f"\nassistant > ", end="", flush