Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The temperature settings not work #65

Open
2 tasks done
LeoLiuYan opened this issue Jul 7, 2024 · 2 comments
Open
2 tasks done

The temperature settings not work #65

LeoLiuYan opened this issue Jul 7, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@LeoLiuYan
Copy link

LeoLiuYan commented Jul 7, 2024

Before submitting your bug report

Relevant environment info

- OS: macOS 14.1
- AutoDev VSCode: v0.5.0
- IDE: VSCode 1.91.0 (Universal)

Description

When set the temperature parameter in settings.json, and restart the VSCode. But when using autoCompletion, the real value of temperature is not changed.

The VSCode settings:
image

The real value captured in LLM Server:
image

To reproduce

  1. Change the value of temperature in settings.json file
  2. Restart the IDE
  3. Capturing the network packages in LLM Server
  4. Use autoCompletion

Log output

No response

@LeoLiuYan LeoLiuYan added the bug Something isn't working label Jul 7, 2024
@meteor199
Copy link
Contributor


{
	"autodev.completions.parameters": {
		"temperature": 0,
		"top_p": 0.9,
		"max_tokens": 500
	}
}

这样试下呢

@zhengxs2018
Copy link
Collaborator

@meteor199 autodev.chat.models 是 webview 下方的模型列表,不是代码补全或内部生成的配置。

发送配置到 webview

webview 启动时,会发送 config/getBrowserSerialized 事件,然后通过 listModels 获取配置的 json 模型并发送过去。

webview 发送对话请求到编辑器

webview 发送 llm/streamChat 事件,传递的参数大概是:

{
   "title": "配置的 chat 模型的 title",
   "completionOptions": {}, // 对话配置
   "messages": [] // 消息列表
}

我用 title 去 autodev.chat.models 匹配,获得真正的模型名称,然后调用 LanguageModelService

image

我把 autodev.chat.models 上的参数和 completionOptions 的参数都丢过去了,但用的浅合并。

问题应该出现在浅合并上,可能哪里有 temperature 属性?我还没去检查

后续的逻辑中,参数时一直在透传的:

image

最近忙公司项目,偷懒没去查,你们要是有空,可以按我的提示去试试改。。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants