From 789eaf535d147032367f4f9daf2e233afa577ea7 Mon Sep 17 00:00:00 2001 From: HAHWUL Date: Wed, 1 Jan 2025 00:07:51 +0900 Subject: [PATCH] Linting Signed-off-by: HAHWUL --- src/analyzer/analyzers/llm_analyzers/ollama.cr | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/analyzer/analyzers/llm_analyzers/ollama.cr b/src/analyzer/analyzers/llm_analyzers/ollama.cr index 8027da0f..0adc5276 100644 --- a/src/analyzer/analyzers/llm_analyzers/ollama.cr +++ b/src/analyzer/analyzers/llm_analyzers/ollama.cr @@ -27,11 +27,8 @@ module Analyzer::AI if File.exists?(path) && !(ignore_extensions().includes? File.extname(path)) File.open(path, "r", encoding: "utf-8", invalid: :skip) do |file| content = file.gets_to_end - params_query = [] of Param - params_body = [] of Param - methods = [] of String result = [] of Endpoint - + begin prompt = <<-PROMPT !! You must only report JSON results. Don't explain anything and don't decorate it with Markdown. !! @@ -55,11 +52,11 @@ module Analyzer::AI Code: #{content} PROMPT - + response = ollama.request(prompt) logger.debug "Ollama response (#{relative_path}):" logger.debug_sub response - + response_json = JSON.parse(response.to_s) response_json.as_a.each do |endpoint| url = endpoint["url"].as_s