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

custom engine server不生效,并没有请求自定义LLM接口 #31

Closed
chisifang opened this issue Aug 22, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@chisifang
Copy link

配置了custom engine server、custom engine token、response format,没有配置customize prompt。在LLM服务端监控autodev插件的调用情况,测试结果如下:

  1. 部分功能不可用,LLM服务端没有收到请求。涉及功能:code complete、explain this、chat with this、chat with xxx(method),大多数功能都没有请求自定义模型接口
  2. 只有autocrud with this 和 generate living doc 这2个功能调用了自定义模型接口,从模型服务端可以看到请求数据和返回。

对照源码:CustomLLMProvider.kt。模型服务入参和返回都没有问题。

感觉插件中上述的几个功能并没有调用自定义模型地址,暂时还没有看到源码,先反馈一下,望回复,谢谢!

@phodal
Copy link
Member

phodal commented Aug 22, 2023

可能是因为 CustomLLMProvider 是通过依赖注入的方式实现的,所以在实例化之后,可能就会继续使用先前的配置。这个时候关闭一下 project,再打开就好了。

@Service(Service.Level.PROJECT)
class CustomLLMProvider(val project: Project) : LLMProvider {
private val autoDevSettingsState = AutoDevSettingsState.getInstance()
private val url = autoDevSettingsState.customEngineServer
private val key = autoDevSettingsState.customEngineToken

@phodal phodal added the bug Something isn't working label Aug 22, 2023
@hotip
Copy link
Contributor

hotip commented Aug 22, 2023

我最新提交应该改了这个问题 并没有,改的是别的问题,这个要让service 使用 getter,每次都从 state 获取而不是使用第一次的

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

3 participants