modelscope / agentscope

Start building LLM-empowered multi-agent applications in an easier way.
https://doc.agentscope.io/
Apache License 2.0
4.81k stars 294 forks source link

[Feature]: Add support to Moonshot #389

Closed bg4xsd closed 1 month ago

bg4xsd commented 1 month ago

The Moonshot model is quite interesting. Is it possible to add support for the Moonshot API interface in AgentScope, so that it can support multiple agents calling complex scenarios on heterogeneous LLM bases? According to the official documentation, the Moonshot API interface is compatible with the OpenAI interface (https://platform.moonshot.cn/). It feels like the workload should not be too great.

bg4xsd commented 1 month ago

Currently, many LLMs provide services by wrapping an API compatible with the OpenAI API method calls, and if we consider this perspective, could we also set up an additional compatible interface, openai_chat_compatible, to facilitate the use of third-party models by intelligent agents?

For embedding models, generative graph, and generative audio, the demand is relatively less, and they can be postponed for now. Through testing, it was found that the openai_chat wrapper could not work with other models on the openai-compatible interface. Could you please ask the masters to spare some time to write an interface to enhance the functionality?

bg4xsd commented 1 month ago
{
    "model_type": "openai_chat",
    "config_name": "moonshot_8k_config",
    "model_name": "moonshot-v1-8k",
    "api_key": "Your key here",
    "client_args": {
        "base_url": "https://api.moonshot.cn/v1"
    },
    "generate_args": {
        "temperature": 0.3
    }
},

The current agentscope can work with OpenAI API interface, Just wirte RIGHT json config file.