Giter VIP home page Giter VIP logo

unit-mesh / auto-dev Goto Github PK

View Code? Open in Web Editor NEW
2.4K 2.4K 274.0 8.16 MB

🧙‍AutoDev: The AI-powered coding wizard with multilingual support 🌐, auto code generation 🏗️, and a helpful bug-slaying assistant 🐞! Customizable prompts 🎨 and a magic Auto Dev/Testing/Document/Agent feature 🧪 included! 🚀

Home Page: https://ide.unitmesh.cc/

License: Mozilla Public License 2.0

Kotlin 98.74% Java 0.02% HTML 0.07% Python 0.67% TypeScript 0.01% Lex 0.48%
aigc genai genaistack ide intellij

auto-dev's Introduction

Unit Mesh: Asymptotic AI programming architecture pattern

Unit Mesh是一种基于人工智能生成的分布式架构,与传统的分布式架构不同,Unit Mesh 中的服务单元 (Unit) 是由 AI 生成的,应用程序中的服务和数据抽象为一个个独立的单元,并通过统一的控制平面进行管理和部署。

简体中文版

Unit Mesh

Unlike traditional distributed architectures, the service units (Units) in Unit Mesh are generated by AI, and the services and data in the application are abstracted into individual units that are managed and deployed through a unified control plane.

PS: The reason why it is called Unit Mesh is because we wrote an underlying service called UnitServer, and there are references to Service Mesh and Data Mesh architecture concepts, so AI takes We suggest we call it Unit Mesh .

TLDR Version

Our initial definition of this version (0.1, called UnitGenius) has three core features:

  • Language and Framework DSL (Domain Specific Language) Abstraction: abstracts non-programming language and framework features to simplify the possibility of errors.
  • REPL as a Service: runs AI-generated code and provides corresponding API services.
  • AI Designed Adaptive Architecture: Self-adaptive API service architecture to automatically adapt and optimize in different environments.

Developers can generate a certain level of DSL abstracted code by interacting with AI, and then run and test this code on REPL, the Serverless service. Developers can also submit this code to the AI for automated operations and maintenance, and the AI will optimize and tune the code to further improve the performance and reliability of the API service.

Start with the nonsense version of the text.

Unit Mesh Preliminary Demo: DSL + REPL = Unit Server

For a detailed process, see the second half of this article.

Front-end page: https://prompt.phodal.com/zh-CN/click-flow/unit-mesh-unit-server/

First, you need to clone the code of Unit Server: https://github.com/prompt-engineering/unit-server , then Then, select kotlin-repl or typescript-repl corresponding to both Kotlin and TypeScript languages.

Then, run your Unit Server according to the corresponding README.

Next, have ChatGPT generate the following code in ChatFlow, and click the Run button:

%spring

@RestController
object Pages {
   @GetMapping("/")
   fun main() = "It works!"
}

Finally, you get a running service (the feature is still under development): http://localhost:8080/ and after visiting the service, if's should be It works.


PS: Here there is a manual code to call the Application class and call the main method, because we need to do static analysis to determine the framework used, for the time being not written in the Unit Server code.

Unit Mesh Architecture

Repeat the definition again:

Unit Mesh is a distributed architecture based on artificial intelligence generation. Unlike traditional distributed architectures, the service units (Units) in Unit Mesh are generated by AI, and the services and data in the application are abstracted into individual units and managed and deployed through a unified control plane.

Unit Mesh

Unit Mesh core idea: AI-generated code is Unit

Unit Mesh is an architectural pattern centered around units.

  • AI generates Units, i.e., the code that AI should generate should be runnable Unit, up to React components and down to backend services.
  • Unit verification: Humans check and verify the units, and if there is a problem with the AI-generated code, then humans just need to fix it.
  • Unit adaptive deployment architecture. When deployed, Units can form Serverless architectures, microservices architectures, monolithic architectures, and mesh architectures, without human intervention.

Carbon base is suitable as a Verifier.

Core Elements of Unit Mesh Architecture

Combined with the Unit Server we designed, the Unit Mesh architecture we designed consists of the following three elements:

Unit Mesh Elements

DSL abstraction for languages and frameworks: encapsulating unstable abstractions

Since AI-generated code has various problems, such as inability to interface with internal cloud platforms, erroneous imports, etc., we need to design domain-specific languages to solve this problem and encapsulate abstractions.

In short: we need to abstract all unstable elements to build stable elements.

The detailed design will be developed later in the Unit Server section.


PS: Since the large language model has a contextual capacity limit, like me, I can't get the recharge only with 4k. therefore, I design the Unit to be called 4k Unit Mesh, I design the DSL to be called 4k Unit DSL, some people may be 99k DSL.

REPL as a Service: AI Code Fixer's

After the DSL, we also need a REPL (Read-Eval-Print Loop) service that can directly run up the AI-generated units and then let humans test whether the generated code is correct. If there are errors in the generated AI, an AI code fixer is needed to fix the code.

For a service, if we are an API, it needs to be a Serverless service, which is why we call it in the diagram: REPL i.e. Serverless service. Details can be found later in the design of Unit Server.

Adaptive Architecture for AI Design

One of the drawbacks of designing systems by humans is that if the units are not the same at design time, development time, and runtime, then there are all kinds of doubts. So, we would prefer to design into a tri-state consistent architectural pattern, which itself is a problem for the adaptive optimization of the architecture.

Since all code is a Unit, it can be designed as a microservice, developed as a Serverless, or online as a monolith. As Google's Service Waver does, we don't decide on the runtime architecture, we let you choose.

So, let AI decide how to run our Units.

Adaptive Architecture


PS: Originally, the title should have been Adaptive Architecture, but I thought about just the code structure and such, and reconsidered it.

Unit Mesh Design Insights: Counterintuitive is the way to go

At the end of last year, when researching low-latency architectures, I was struck by various counterintuitive architectural patterns in this field, such as: GC is the problem, then don't GC.

So when designing Unit Mesh, our question remains the same: How to open your mind. So our main challenge is how to expand your mind and open your mind**.

Point 1: If layered architecture is the bottleneck, then don't layered architecture

In that "Future-proof AI programming" layered architecture is our biggest challenge, so the ideal way to propose is the Serverless + FaaS approach, which is based on the existing armament and is too idealistic.

And as we wrote UnitServer, we found that we could also Class as a Service approach (manual dog head).

Since our code runs in the cloud and is generated by AI, do humans have to look at the code? When do humans have to look at the code? It's just when they check in, and when they review the architecture, so they only need to generate the architecture when they review it.

Example: I want to analyze the calls to xx services and the corresponding code, please pull it out for me.

Point 2: If dependencies are the problem, then don't depend on them

The second challenge we encounter is the dependency problem, and dependencies are two problems:

  • Library dependencies for the project. That is, library dependencies similar to Gradle, Maven, NPM at this level
  • Code dependencies. I.e. import of the code source file

Repeater ChatGPT does not solve the problem very well, so you have to let GPT forget about it. The ideal programming experience should be that if I want to use Spring, the intelligence will automatically analyze the dependencies, such as Intelij IDEA. so we use % spring like Jupyter magic syntax in UnitServer to automatically solve these two types of problems.

Point 3: If Serverless deployment is the problem, then don't use Serverless deployment

Initially in Unit Server, we designed Unit Server as a Serverless-like architecture, so we ran into a problem: the cost of a Serverless architecture is not acceptable to all. So, we just need to use Serverless as a development when testing Unit and merge it into a monolithic or microservice architecture online, then we can solve this problem perfectly.

At this point, we also need to break through the hierarchical architecture, since each time the code is generated, we only need a package name, such as: org.clickprompt.unitmesh, all the code is under this package; or, we can further divide the business into different packages, combined with tools to categorize the code.

Unit Mesh Discovery Path: From REPL to UnitServer

The above is too theoretical, let's take a look at our exploration path, which is divided into four steps:

  1. start with a minimal Hello, world optimization
  2. build a REPL environment
  3. abstract and simplify the design ← repeat. 4.
  4. connect to the real-world Prompt.

See Unit Server and ChatFlow commit records for details.

Start with the smallest Hello, world

First, let's look at a Hello, World for Spring written in Kotlin Script.

@file:DependsOn("org.springframework.boot:spring-boot-starter-web:2.7.9")

import ...
import java.util.*

@Controller
class HelloController {
    @GetMapping("/hello")
    fun helloKotlin(): String {
        return "hello world"
    }
}

@SpringBootApplication
open class ReplApplication

fun main(args: Array<String>) {
    ...
}

main(arrayOf("--server.port=8083"))

In this example, you will find a series of useless code, dependency information, import information, main function. And as the creator of a 4k Unit Mesh, I had to get rid of these unstable useless messages in order to run it correctly, so it became:

%use spring

@Controller
class HelloController {
    @GetMapping("/hello")
    fun helloKotlin(): String {
        return "hello world"
    }
}

This way, I just need to get ChatGPT to return the Controller and that's it.

Building the REPL environment: WebSocket + %magic

Now that we have a simplified DSL, the next step is to bring in Kotlin Script to build a Unit Serverless server, which is what we have: https://github.com/prompt-engineering/unit-server.

The source code of Unit Server is built on the Kotlin Jupyter API, which encapsulates the Kotlin REPL environment. The main reason for basing this on Kotlin Jupyter instead of Kotlin REPL is that magic and DSL can be used to abstract the details, such as in

"spring" to Json.encodeToString(
    SimpleLibraryDefinition(
        imports = listOf(
            "org.springframework.boot.*".
            "org.springframework.boot.autoconfigure.*".
            "org.springframework.web.bind.annotation.*".
            "ComponentScan".
            Configuration", "org.springframework.context.annotation.
        Configuration").
        dependencies = listOf(
            "org.springframework.boot:spring-boot-starter-web:2.7.9"
        )
    )
)

That is, you can automatically add Spring's dependencies and Import information, and you can support the Hello, World approach to the steps. In addition to Spring, we also need magic for other libraries.

Finally, the interface is then exposed using WebSocket to make it available to ChatFlow.

Abstraction, simplified design ← Loop

Of course, just having a hello, world isn't enough, so we need more examples, such as access to a database. And because of Spring's scanning mechanism, and we don't want to (mostly not) do too much specialization for Spring, we switched to the Kotr framework in Kotlin.

PS: It is worth noting that we still need to abstract the framework, but Ktor is a little better than we expected. So, here comes our second version of

%use kotless
%use exposed

data class User(val id: Int, val username: String)

class Server : KotlessAWS() {
    override fun prepare(app: Application) {
        Database.connect("jdbc:h2:mem:test", driver = "org.h2.Driver")

        transaction {
            SchemaUtils.create(Users)
        }

        app.routing {
            post("/register") {
                val user = call.receive<User>()
                val id = transaction {
                    // Insert the new user into the database
                    users.insert {
                        it[username] = user.username
                    } get Users.id
                }

                val newUser = User(id, user.username)
                call.respond(newUser)
            }
        }
    }
}

object Users : org.jetbrains.exposed.sql.Table("users") {
    val id = integer("id").autoIncrement()
    val username = varchar("username", 50).uniqueIndex()

    override val primaryKey = PrimaryKey(id, name = "PK_User_ID")
}

In this version, we use Exposed as the ORM for the database, using H2 as the database. Of course, it's still 10% away from taking this code as a Unit, but basically it can solve most of the CRUD scenarios.

PS 1: KotlessAWS here is just an AWS Serverless abstraction, does not affect our operation, we can directly encapsulate a UnitMesh class, is lazy.

PS 2: We just need to take out the code in routing by static analysis, and then optimize it. More code for exploring the process can be found at: _samples.

A real-world Prompt

Now, let's run it in conjunction with AI: the

``kotlin Please help me implement a RESTful API for user registration using Ktor + Kotlin + Exposed, with the following requirements:

  • Where database is involved, please use Database.connect directly.
  • Only return the core logic and write it in Server class, I want to deploy it in Serverless server.
  • Please use Kotlin DSL to write the code.
  • Do not return any other extraneous code such as comments, dependencies, imports, etc.

Finally, you return only the code of the class, in the following format:


```kotlin
class Server : KotlessAWS() {
    override fun prepare(app: Application) {
        Database.connect("jdbc:h2:mem:test", driver = "org.h2.Driver", user = "root", password = "")
        transaction {
            SchemaUtils.create(Users)
        }

        app.routing {
            { {{{}}}
        }
    }
}

Life is short, welcome to join our Watchlist and discuss the future together.

Join Waitlist

Right now Waitlist engineers, you can join Unit Mesh's Watchlist at:

https://github.com/prompt-engineering/unit-mesh

auto-dev's People

Contributors

actions-user avatar c913168497 avatar dependabot[bot] avatar eltociear avatar geekywizkid avatar gitbutler-client avatar hanrw avatar hotip avatar hu-qi avatar imneov avatar iptton avatar jialiu-github avatar phodal avatar songyb-jk avatar ymli0215 avatar yugasun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auto-dev's Issues

支持TDD开发模式,根据指定测试生成对应实现

本功能可能对应的场景(功能逐步累加):

  1. 实现代码不存在,根据某一个指定的测试生成对应实现
  2. 实现代码已存在,根据新加测试添加/修改实现代码并不破坏原有测试
  3. 实现代码已存在,根据与其相关的测试变动(增、删、改)更新实现代码

custom配置咨询

image

使用的是1.5.1-222版本的插件,AI Engine选择了Custom,请问Custom Request Body Format (Json Path) 这个选项怎么配置,我这边一直报Failed to parse custom request body的错误

json解析异常

填的参数
Custom Request Body Format(Json File):
{"customFields":{"model":"/data/model/deepseek-coder-33b-instruct","stop":["<|im_end>|","|EOT|"],"stream":0}}

完整异常
Failed to parse custom request body

java.lang.IllegalArgumentException: Element class kotlinx.serialization.json.JsonArray is not a JsonPrimitive
	at kotlinx.serialization.json.JsonElementKt.error(JsonElement.kt:326)
	at kotlinx.serialization.json.JsonElementKt.getJsonPrimitive(JsonElement.kt:229)
	at cc.unitmesh.devti.llms.custom.CustomLLMProviderKt.updateCustomBody(CustomLLMProvider.kt:216)
	at cc.unitmesh.devti.llms.custom.CustomLLMProviderKt.updateCustomFormat(CustomLLMProvider.kt:252)
	at cc.unitmesh.devti.llms.custom.CustomLLMProvider.stream(CustomLLMProvider.kt:82)
	at cc.unitmesh.devti.gui.chat.ChatCodingService.makeChatBotRequest(ChatCodingService.kt:84)
	at cc.unitmesh.devti.gui.chat.ChatCodingService.handlePromptAndResponse$lambda$1(ChatCodingService.kt:47)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:249)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

CustomAgent - extends API for code RAG

Generate by ChatGPT

GitHub Issue Roadmap for RebuildWise

Milestone 1: Project Initiation and System Understanding

  1. Issue 2: System Analysis with LLM

    • Description: Use LLM to analyze the existing legacy system's source code, data structures, and documentation. Document key findings.
    • Labels: system-analysis, documentation
  2. Issue 3: Requirements Gathering with RAG

    • Description: Utilize RAG to retrieve and compile domain-specific knowledge for gathering and documenting user requirements.
    • Labels: requirements, research

Milestone 2: Refactoring Planning

  1. Issue 4: Initial Refactoring Plan with LLM

    • Description: Generate an initial refactoring plan using LLM, including high-level architecture design and technology stack selection.
    • Labels: refactoring-plan, architecture
  2. Issue 5: Best Practices Research with RAG

    • Description: Use RAG to find information on best practices and case studies related to legacy system refactoring. Integrate these insights into the refactoring plan.
    • Labels: best-practices, research

Milestone 3: Implementation and Testing

  1. Issue 6: Code Generation with LLM

    • Description: Employ LLM to generate code for standard tasks and modules, streamlining the development process.
    • Labels: code-generation, development
  2. Issue 7: Test Case Generation with LLM

    • Description: Utilize LLM to automatically create test cases and test data, ensuring thorough testing of the refactored system.
    • Labels: testing, quality-assurance

Milestone 4: Documentation and Knowledge Sharing

  1. Issue 8: Documentation Enhancement with LLM

    • Description: Use LLM to improve system documentation, making it more comprehensive and user-friendly.
    • Labels: documentation, knowledge-sharing
  2. Issue 9: Technical Support with LLM

    • Description: Implement LLM-powered technical support to assist developers in troubleshooting, performance optimization, and security enhancements.
    • Labels: technical-support, development

This roadmap provides a structured plan for the RebuildWise project, with a focus on leveraging LLM and RAG throughout the different stages of system refactoring. You can create these GitHub issues in your repository and assign them to relevant team members, setting priorities and due dates as needed. Remember to adapt the roadmap based on your project's specific requirements and goals.

Prompts Override

Can directly override default template if same in prompts, like prompts/genius/code-review.vm

代码回写时报错

报错信息如下:

Access is allowed from event dispatch thread only

com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments: EventQueue.isDispatchThread()=false
...
...

1.2.1 版本之后,模型返回的数据流输出不对

          > @phodal 升级1.2.3不报错,但是模型返回的数据流没有正常输出。回滚到1.2.1版本之后一切正常。 模型服务一直没有改过,输入输出都是按照文档要求。 从现象看,就是1.2.1之后的版本对返回数据解析做了调整

建议新起个 issue

Originally posted by @hotip in #47 (comment)

github repo 的 description 是否必要?

使用插件的时候简单新建了一个repo用来存储用户故事,调用报错 java.lang.NullPointerException: repo.description must not be null
我看了一下代码感觉 repo.description 非必要
是否考虑去除?

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

配置了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。模型服务入参和返回都没有问题。

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

升级1.2.2版本之后插件报错,1.2.1版本正常

idea版本:IntelliJ IDEA 2023.2.2 (Ultimate Edition) Build #IU-232.9921.47, built on September 13, 2023
使用场景:配置了custom engine server
问题版本:1.2.2,报错内容如下:
Unhandled exception in [StandaloneCoroutine{Cancelling}@183c00b, Dispatchers.Default]

java.lang.NumberFormatException: For input string: ""
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
at java.base/java.lang.Long.parseLong(Long.java:721)
at java.base/java.lang.Long.parseLong(Long.java:836)
at cc.unitmesh.devti.gui.chat.ChatCodingPanel$updateMessageInUi$3.invokeSuspend(ChatCodingPanel.kt:217)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelled}@183c00b, Dispatchers.Default]

备注:1.2.1版本没有报错,模型返回解析正常

213版本不兼容,代码无法build

以下文件报错:

  1. AutoDevToolWindowFactory.kt:24:28 Unresolved reference: getInstance
  2. CoUnitToolConfigurable.kt:36:21 Cannot find a parameter with this name: prop
  3. TeamPromptsConfigurable.kt:26:21 Cannot find a parameter with this name: prop

Test data generate for migration

根据《系统重构与迁移指南》的定义,我们将需要实现如下的功能:

  • 基于 Controller 调用链,生成测试场景。
  • 基于函数的输入和输出,生成示例 JSON 数据。
  • 基于场景和数据结构,生成对应的 API 测试代码

Prompt 策略:

  • 当调用链过长时,只捕获异常代码,作为测试场景。

When I try to use `test it` the following error occurred. java.lang.Throwable: Could not find WriteTestService for xxx

  • Goland: GoLand 2023.3.2
  • AutoDev: 1.5.3-233
  • error detail
java.lang.Throwable: Could not find WriteTestService for: JSFile:test.js
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at cc.unitmesh.devti.intentions.action.task.TestCodeGenTask.run(TestCodeGenTask.kt:43)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:484)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
	at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:86)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:464)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

Feature Request: LLM Restful format customizable

Currently Restful format has 2 style, OpenAI and Azure , and Custom means Azure.

should be customizable for:

  • set custom Header (for example: google's PaML2 api not need a Authorization header)
  • append key to Url (for example: google's PaLM2 api append its key in url)
  • customizable request body format

1.0版本运行devti://story/github/1报错

java.util.NoSuchElementException: Collection contains no element matching the predicate.
at cc.unitmesh.idea.spring.JavaSpringCodeCreator.createControllerOrUpdateMethod(JavaSpringCodeCreator.kt:282)
at cc.unitmesh.idea.flow.provider.JvmAutoDevFlow.createCode(JvmAutoDevFlow.kt:220)
at cc.unitmesh.idea.flow.provider.JvmAutoDevFlow.createCodeByType(JvmAutoDevFlow.kt:208)
at cc.unitmesh.idea.flow.provider.JvmAutoDevFlow.createCodeByType$default(JvmAutoDevFlow.kt:202)
at cc.unitmesh.idea.flow.provider.JvmAutoDevFlow.createServiceFile(JvmAutoDevFlow.kt:186)
at cc.unitmesh.idea.flow.provider.JvmAutoDevFlow.updateOrCreateServiceAndRepository(JvmAutoDevFlow.kt:141)
at cc.unitmesh.devti.runconfig.AutoDevRunProfileState$executeCrud$1.run(AutoDevRunProfileState.kt:85)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:429)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:480)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)

解析response时报错

image

这是我的配置信息

image

这个IDEA的日志,获取response之后解析报错,请问这个是什么原因,跟jdk版本有关系吗,我这边用的是1.8

科大讯飞星火模型 API && API 重构

LLMProvider api 设计不太适合当前 LLM 模型需求。

/**
 * LLMProvider provide only session-free interfaces
 *
 * It's LLMProvider's responsibility to maintain the network connection
 * But the chat session is maintained by the client
 *
 * The implementations should provide a way to convert the response to a ChatSession
 */
abstract class LLMProvider<M : ChatMessage> {

    // observe response
    abstract val response: Flow<ChatSession<M>>
    // send request
    abstract fun textComplete(session: ChatSession<ChatMessage>)
    // send image request
    abstract fun imageGenerate(prompt: String): Flow<ChatSession<M>>
    // response json to ChatSession Data transformer
    protected abstract fun responseToChatSession(sendingSession: ChatSession<M>, responseBody: String): ChatSession<M>
}

https://gist.github.com/hotip/0514521ffee37c3b49cef52dbad96f16

java.lang.Throwable: Read access is allowed from inside read-action (or EDT)

IDEA版本: IntelliJ IDEA 2023.1 (Ultimate Edition) Build #IU-231.8109.175, built on March 28, 2023

配置好之后报错如下:

java.lang.Throwable: Read access is allowed from inside read-action (or EDT) only (see com.intellij.openapi.application.Application.runReadAction())
Current thread: Thread[ApplicationImpl pooled thread 43,4,main] 21718972 (EventQueue.isDispatchThread()=false)
SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 854203447
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:202)
	at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:1004)
	at com.intellij.psi.impl.source.PsiFileImpl.assertReadAccessAllowed(PsiFileImpl.java:184)
	at com.intellij.psi.impl.source.PsiFileImpl.getStubTree(PsiFileImpl.java:621)
	at com.intellij.psi.impl.source.PsiFileImpl.getGreenStubTree(PsiFileImpl.java:956)
	at com.intellij.psi.impl.source.SpineRef.getGreenStub(SpineRef.java:36)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getGreenStub(StubBasedPsiElementBase.java:352)
	at com.intellij.extapi.psi.StubBasedPsiElementBase.getParent(StubBasedPsiElementBase.java:314)
	at cc.unitmesh.devti.actions.CodeCompleteAction$actionPerformed$task$1.run(CodeCompleteAction.kt:41)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:429)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:480)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:833)

自定义本地模型不能正常接收sse响应

相同的请求,只修改response type:
如果是json可以看到有流式返回,但是插件没有打印返回;
如果是sse则可以从我们的服务看到响应体里什么都没有。

Custom模式下,自定义Custom Engine Prompt 报错

2024-01-08 14:48:59,875 [ 107915]   INFO - #c.u.d.c.a.CustomPromptConfig - Loaded prompt config: CustomPromptConfig(spec={}, prompts=[cc.unitmesh.devti.custom.action.CustomIntentionConfig@630ee774], documentations=null)
2024-01-08 14:48:59,935 [ 107975]   INFO - #c.u.d.c.a.CustomPromptConfig - Loaded prompt config: CustomPromptConfig(spec={}, `prompts=[cc.unitmesh.devti.custom.action.CustomIntentionConfig@21012da9],` documentations=null)
2024-01-08 14:49:02,070 [ 110110]   INFO - #c.u.d.c.a.CustomPromptConfig - Loaded prompt config: CustomPromptConfig(spec={}, prompts=[cc.unitmesh.devti.custom.action.CustomIntentionConfig@58a77216], documentations=null)
2024-01-08 14:49:03,051 [ 111091]   INFO - #c.u.d.c.a.CustomPromptConfig - Loaded prompt config: CustomPromptConfig(spec={}, prompts=[cc.unitmesh.devti.custom.action.CustomIntentionConfig@2e2d671b], documentations=null)
2024-01-08 14:49:03,082 [ 111122]   INFO - STDERR - SLF4J: No SLF4J providers were found.
2024-01-08 14:49:03,084 [ 111124]   INFO - STDERR - SLF4J: Defaulting to no-operation (NOP) logger implementation
2024-01-08 14:49:03,084 [ 111124]   INFO - STDERR - SLF4J: See https://www.slf4j.org/codes.html#noProviders for further details.
2024-01-08 14:49:03,084 [ 111124]   INFO - STDERR - SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions 1.7.x or earlier.
2024-01-08 14:49:03,085 [ 111125]   INFO - STDERR - SLF4J: Ignoring binding found at [jar:file:/C:/software/JetBrains/IntelliJ%20IDEA%20Community%20Edition%202022.2.5/lib/3rd-party-rt.jar!/org/slf4j/impl/StaticLoggerBinder.class]
2024-01-08 14:49:03,086 [ 111126]   INFO - STDERR - SLF4J: See https://www.slf4j.org/codes.html#ignoredBindings for an explanation.
2024-01-08 14:49:03,136 [ 111176] SEVERE - #c.i.i.p.PluginManager - Velocity could not be initialized!
java.lang.RuntimeException: Velocity could not be initialized!
        at org.apache.velocity.runtime.RuntimeInstance.requireInitialization(RuntimeInstance.java:376)
        at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1323)
        at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1433)
        at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1395)
        at org.apache.velocity.app.Velocity.evaluate(Velocity.java:184)
        at cc.unitmesh.devti.custom.CustomActionIntention.buildCustomPrompt(CustomActionIntention.kt:85)
        at cc.unitmesh.devti.custom.CustomActionIntention.invoke(CustomActionIntention.kt:46)
        at cc.unitmesh.devti.intentions.IntentionsActionGroup$getChildren$1$1.invoke(IntentionsActionGroup.kt:25)
        at cc.unitmesh.devti.intentions.IntentionsActionGroup$getChildren$1$1.invoke(IntentionsActionGroup.kt:24)
        at cc.unitmesh.devti.intentions.IntentionsActionGroup.getChildren$lambda$1$lambda$0(IntentionsActionGroup.kt:24)
        at com.intellij.openapi.project.DumbAwareAction$SimpleDumbAwareAction.actionPerformed(DumbAwareAction.java:82)
        at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:315)
        at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:294)
        at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:337)
        at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:294)
        at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$performAction$4(ActionMenuItem.java:293)
        at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:227)
        at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.java:286)
        at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$new$0(ActionMenuItem.java:67)
        at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
        at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$3(ActionMenuItem.java:109)
        at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
        at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
        at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:109)
        at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:546)
        at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:578)
        at java.desktop/java.awt.Component.processMouseEvent(Component.java:6656)
        at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385)
        at java.desktop/java.awt.Component.processEvent(Component.java:6421)
        at java.desktop/java.awt.Container.processEvent(Container.java:2266)
        at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
        at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
        at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
        at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
        at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
        at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2804)
        at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:790)
        at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:739)
        at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:763)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:761)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:760)
        at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:918)
        at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:840)
        at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:763)
        at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:450)
        at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791)
        at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:449)
        at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
        at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624)
        at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:447)
        at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881)
        at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: org.apache.velocity.exception.VelocityException: The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.
at org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:824)
        at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:282)
        at org.apache.velocity.runtime.RuntimeInstance.requireInitialization(RuntimeInstance.java:371)
        ... 66 more
2024-01-08 14:49:03,141 [ 111181] SEVERE - #c.i.i.p.PluginManager - IntelliJ IDEA 2022.2.5  Build #IC-222.4554.10
2024-01-08 14:49:03,142 [ 111182] SEVERE - #c.i.i.p.PluginManager - JDK: 17.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2024-01-08 14:49:03,143 [ 111183] SEVERE - #c.i.i.p.PluginManager - OS: Windows 7
2024-01-08 14:49:03,144 [ 111184] SEVERE - #c.i.i.p.PluginManager - Plugin to blame: AutoDev version: 1.5.2-222
2024-01-08 14:49:04,223 [ 112263]   INFO - #o.k.p.KafkaStateComponent - Save state:{}{}
2024-01-08 14:49:04,278 [ 112318]   INFO - #c.i.c.ComponentStoreImpl - Saving appFileTypeManager took 15 ms, FindSettings took 13 ms, KeymapManager took 11 ms, KotlinRejectersInfoService took 18 ms
2024-01-08 14:49:05,919 [ 113959]   INFO - #c.u.d.c.a.CustomPromptConfig - Loaded prompt config: CustomPromptConfig(spec={}, prompts=[cc.unitmesh.devti.custom.action.CustomIntentionConfig@212d58b7], documentations=null)
2024-01-08 14:49:06,081 [ 114121]   INFO - #c.i.o.a.i.PopupMenuPreloader - 7134 ms since showing to preload popup menu 'Editor Popup Menu' at 'EditorPopup' in 163 ms

what reason?

java.lang.RuntimeException: java.net.SocketTimeoutException: Connect timed out
at io.reactivex.internal.util.ExceptionHelper.wrapOrThrow(ExceptionHelper.java:45)
at io.reactivex.internal.observers.BlockingMultiObserver.blockingGet(BlockingMultiObserver.java:90)
at io.reactivex.Single.blockingGet(Single.java:2002)
at com.theokanning.openai.service.OpenAiService.execute(OpenAiService.java:260)
at com.theokanning.openai.service.OpenAiService.createChatCompletion(OpenAiService.java:129)
at cc.unitmesh.devti.connector.openai.OpenAIConnector.prompt(OpenAIConnector.kt:84)
at cc.unitmesh.devti.gui.chat.ChatCodingService.makeChatBotRequest(ChatCodingService.kt:54)
at cc.unitmesh.devti.gui.chat.ChatCodingService.handlePromptAndResponse$lambda$1(ChatCodingService.kt:33)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:246)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.net.SocketTimeoutException: Connect timed out
at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:546)
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:597)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:633)
at okhttp3.internal.platform.Platform.connectSocket(Platform.java:130)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:263)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:183)
at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at com.theokanning.openai.service.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:28)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
at okhttp3.RealCall.execute(RealCall.java:81)
at retrofit2.OkHttpCall.execute(OkHttpCall.java:204)
at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:46)
at io.reactivex.Observable.subscribe(Observable.java:10151)
at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:35)
at io.reactivex.Observable.subscribe(Observable.java:10151)
at io.reactivex.internal.operators.observable.ObservableSingleSingle.subscribeActual(ObservableSingleSingle.java:35)
at io.reactivex.Single.subscribe(Single.java:2517)
at io.reactivex.Single.blockingGet(Single.java:2001)
... 15 more

关于添加 gitlab 的支持

如果谈论到私有化,那么大量的开发团队还使用了Gitlab 作为代码托管管理工具,是否应该添加支持,配置项目应该放在哪里合适?
我在老版本已经加过了不过更新之后没找到原先放github token 的地方

request rate limit

consider provide setting to limit request rate

com.theokanning.openai.OpenAiHttpException: Rate limit reached for default-gpt-3.5-turbo in organization org-lpTV8JA1Fonfq3PljHSxtabv on requests per min. Limit: 3 / min. Please try again in 20s. Contact us through our help center at help.openai.com if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method.
	at com.theokanning.openai.service.ResponseBodyCallback.onResponse(ResponseBodyCallback.java:53)
	at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:161)
	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:504)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'committer' at row 1

in context with path [] threw exception [Request processing failed; nested exception is org.jdbi.v3.core.statement.UnableToExecuteStatementException: java.sql.BatchUpdateException: Data truncation: Data too long for column 'committer' at row 1 [statement:"
archguard-backend | INSERT INTO scm_change_entry (system_id,old_path,new_path,commit_time,cognitive_complexity,change_mode,commit_id,committer,line_added,line_deleted)
archguard-backend | VALUES (:systemId,:item.oldPath,:item.newPath,:item.commitTime,:item.cognitiveComplexity,:item.changeMode,:item.commitId,:item.committer,:item.lineAdded,:item.lineDeleted)
archguard-backend | ON DUPLICATE KEY UPDATE commit_id=commit_id

new chat不生效

autodev配置了自定义custom engine server
case描述:autodev插件端点击"new chat",同时关闭当前“code”对话框。这种情况下,按道理下次对话应该重置并开启新一轮对话,但实际不是。
重新使用autodev中随便一个功能,模型服务端依然会收到上一轮对话中全部message。
只有重新启动IDEA才会开启新一轮对话。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.