Skip to content

v3.2.1.0

Compare
Choose a tag to compare
@Maplemx Maplemx released this 11 Mar 02:30
· 258 commits to main since this release

New Features:

  1. [Request] New models are supported!

    新增了两个模型的支持!

    • Claude:
    import Agently
    agent_factory = Agently.AgentFactory()
    
    (
        agent_factory
            .set_settings("current_model", "Claude")
            .set_settings("model.Claude.auth", { "api_key": "" })
            # switch model
            # model list: https://docs.anthropic.com/claude/docs/models-overview
            # default: claude-3-sonnet-20240229
            .set_settings("model.Claude.options", { "model": "claude-3-opus-20240229" })
    )
    
    # Test
    agent = agent_factory.create_agent()
    agent.input("Print 'It works'.").start()
    • MiniMax:
    import Agently
    agent_factory = Agently.AgentFactory()
    
    (
        agent_factory
            .set_settings("current_model", "MiniMax")
            .set_settings("model.MiniMax.auth", {
                "group_id": "",
                "api_key": ""
            })
            # switch model
            # model list:https://www.minimaxi.com/document/guides/chat-model/V2?id=65e0736ab2845de20908e2dd
            # default: abab5.5-chat
            .set_settings("model.MiniMax.options", { "model": "abab6-chat" })
    )
    
    # Test
    agent = agent_factory.create_agent()
    agent.input("Print 'It works'.").start()
  2. [Agent Workflow] add new feature .draw() to generate mermaid code to present current workflow graph!

    添加了可以根据workflow连接情况生成流程图代码(mermaid格式)的方法。

    # after connect all chunks
    mermaid_code = workflow.draw()
    
    # you can use mermaid-python package to draw the graph in colab
    # !pip install -q -U mermaid-python
    from mermaid import Mermaid
    Mermaid(mermaid_code)

Bug Fixed:

  1. [Framework]: #49
    Added try except when request event loop is not in debug mode to avoid error Event loop is closed.
    添加了try except逻辑,来减少在非debug模式下Event loop is closed的报错;
  2. [Agently Workflow]: #48
    Removed unnecessary print when workflow start running.
    移除了workflow启动时会出现的一个不必要的print。