From 9b27f21885731cc7c201382f25e648c556e81a58 Mon Sep 17 00:00:00 2001 From: Mark Chao Date: Thu, 2 May 2024 14:44:18 +0800 Subject: [PATCH] Change doc search endpoint --- ee/lib/gitlab/llm/ai_gateway/docs_client.rb | 2 +- ee/spec/lib/gitlab/llm/ai_gateway/docs_client_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ee/lib/gitlab/llm/ai_gateway/docs_client.rb b/ee/lib/gitlab/llm/ai_gateway/docs_client.rb index f8b5c5be90415a..46a79df1277417 100644 --- a/ee/lib/gitlab/llm/ai_gateway/docs_client.rb +++ b/ee/lib/gitlab/llm/ai_gateway/docs_client.rb @@ -34,7 +34,7 @@ def perform_search_request(query:, options:) timeout = options.delete(:timeout) || DEFAULT_TIMEOUT response = Gitlab::HTTP.post( - "#{Gitlab::AiGateway.url}/v1/search/docs", + "#{Gitlab::AiGateway.url}/v1/search/gitlab-docs", headers: request_headers, body: request_body(query: query).to_json, timeout: timeout, diff --git a/ee/spec/lib/gitlab/llm/ai_gateway/docs_client_spec.rb b/ee/spec/lib/gitlab/llm/ai_gateway/docs_client_spec.rb index 50717e465720a9..bb1e4dae14f4cc 100644 --- a/ee/spec/lib/gitlab/llm/ai_gateway/docs_client_spec.rb +++ b/ee/spec/lib/gitlab/llm/ai_gateway/docs_client_spec.rb @@ -47,7 +47,7 @@ { "foo" => "bar" } end - let(:request_url) { "#{Gitlab::AiGateway.url}/v1/search/docs" } + let(:request_url) { "#{Gitlab::AiGateway.url}/v1/search/gitlab-docs" } let(:tracking_context) { { request_id: 'uuid', action: 'chat' } } let(:response_body) { expected_response.to_json } let(:http_status) { 200 } -- GitLab