The LLM-based topic recognition model is complete and adapted to quickly updating Weibo topics.

This commit is contained in:
戒酒的李白
2025-08-07 11:14:38 +08:00
parent 1e780876c9
commit d88d5edd99
32 changed files with 8352 additions and 1 deletions
@@ -0,0 +1,12 @@
class Client:
def __init__(self, api_key: str, azure_endpoint: dict = None) -> None:
if azure_endpoint:
from openai import AzureOpenAI
self.client = AzureOpenAI(api_key=api_key, api_version=azure_endpoint['api_version'], azure_endpoint=azure_endpoint['endpoint'])
else:
from openai import OpenAI
self.client = OpenAI(api_key=api_key)
def __getattr__(self, name):
"""Delegate attribute access to the self.client object."""
return getattr(self.client, name)