mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: add xAI provider (#8781)
### What problem does this PR solve? Add xAI provider (experimental feature, requires user feedback). ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -568,6 +568,16 @@ class BaiChuanChat(Base):
|
||||
yield total_tokens
|
||||
|
||||
|
||||
class xAIChat(Base):
|
||||
_FACTORY_NAME = "xAI"
|
||||
|
||||
def __init__(self, key, model_name="grok-3", base_url=None, **kwargs):
|
||||
if not base_url:
|
||||
base_url = "https://api.x.ai/v1"
|
||||
super().__init__(key, model_name, base_url=base_url, **kwargs)
|
||||
return
|
||||
|
||||
|
||||
class QWenChat(Base):
|
||||
_FACTORY_NAME = "Tongyi-Qianwen"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user