Improve adaptability of AIGW completions
This implements a series of improvements deemed necessary over the implementation of prompt migrations (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/165884 and https://gitlab.com/gitlab-org/gitlab/-/merge_requests/167364), in regards to allowing feature teams to incorporate their own specific behavior. Concretely, these changes accomplish the following: - Allow signaling an error when processing the inputs - Allow an early return when the AI action shouldn't be executed - Facilitate overriding the response modifier - Facilitate feature-specific error structures - Allow post-processing the AIGW response before sending it to the modifier - Notify callers when an unexpected error occurs
显示
- ee/lib/gitlab/llm/ai_gateway/completions/base.rb 27 个添加, 2 个删除ee/lib/gitlab/llm/ai_gateway/completions/base.rb
- ee/lib/gitlab/llm/ai_gateway/response_modifiers/base.rb 13 个添加, 7 个删除ee/lib/gitlab/llm/ai_gateway/response_modifiers/base.rb
- ee/spec/lib/gitlab/llm/ai_gateway/completions/base_spec.rb 88 个添加, 14 个删除ee/spec/lib/gitlab/llm/ai_gateway/completions/base_spec.rb
- ee/spec/lib/gitlab/llm/ai_gateway/response_modifiers/base_spec.rb 5 个添加, 7 个删除...lib/gitlab/llm/ai_gateway/response_modifiers/base_spec.rb
加载中
想要评论请 注册 或 登录