Skip to content

tangjiewei0336/SEProblemFixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SEProblemFixer

locate_with_questions_deepseek

环境配置

  1. 安装pip模块

    pip install --upgrade "openai>=1.0"
    pip install --upgrade "volcengine-python-sdk[ark]"
  2. config.py中配置API_KEYbase_url

    DeepSeeK官方的R1的API不支持JSON Output和Function Call,但火山引擎中的DeepSeeK-R1支持。

    同时,获取摘要的函数使用了火山引擎批量推理功能降低成本,因此运行代码必须配置火山引擎。

    import os
    
    deepseek_api_key = os.environ.get("ARK_API_KEY") # 记得设置系统环境变量`ARK_API_KEY`。
    deepseek_base_url = "https://ark.cn-beijing.volces.com/api/v3"
    deepseek_model = "" # your 在线推理 model Endpoint ID 
    deepseek_bi_model = "" # your 批量推理 model Endpoint ID

运行说明

  1. prompt/deepseek/locate_with_questions.txt中,可以自己定义提示词,提示词支持的变量有以下几种:

    • commit_hash, commit_message, commit_type
    • code_repo, summary

    通过定义这些提示词,你可以自定义输入的是代码仓库还是代码总结。

  2. locate_deepseek.py支持summary, 修改prompt/deepseek/locate_with_questions.txt即可。

  3. locate_ark_bi.py是调用火山引擎批量推理进行多线程批量处理所有的测试用例,暂不支持summary。

实验笔记

  1. 最终实验代码还是没有使用Function Calling功能,因为火山引擎的文档中对Function Calling功能做了以下陈述。

    Function Calling并不会增强模型能力, 并且FC模型综合能力不如pro

    不推荐使用其试图完成模型正常情况下做不到的事

    写代码、写sql、(无插件)解题等

    参考资料: Function Calling 使用说明

  2. 使用DeepSeeK-R1进行多轮对话效果不好,无论如何修改System Prompt和User Prompt,模型从不询问问题。

  3. 对比GLM-4,在复杂任务表现更好,如"实现jwt"任务中,他有创建文件的想法而GLM-4没有。

  4. 新的问题:上下文长度受限。

  5. 未来探索:doubao-1.5-thinking-pro?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •