moonshot.py 360 B

123456789101112
  1. # -*- coding: utf-8 -*-
  2. from .__load__ import *
  3. from langchain_community.chat_models import MoonshotChat
  4. class Moonshot(object):
  5. def load(self, model = 'moonshot-v1-32k', streaming = True):
  6. return MoonshotChat(
  7. model=model,
  8. moonshot_api_key=Demeter.config['moonshot']['api_key'],
  9. streaming=streaming,
  10. )