saoudrizwan / claude-dev

Autonomous coding agent right in your IDE, capable of creating/editing files, executing commands, and more with your permission every step of the way.
https://marketplace.visualstudio.com/items?itemName=saoudrizwan.claude-dev
MIT License
5.95k stars 546 forks source link

API request seems not to comunicate with any model. It seems that doesnt get the promp properly. (Ubuntu) #419

Open Von-D-Aifvan opened 5 days ago

Von-D-Aifvan commented 5 days ago

Which API Provider are you using?

Ollama

Which Model are you using?

Any model

What happened?

I create a task as simple as this:

It doesnt matter the model or the task it always return the same messages below. create an .html file Tokens: 2,052 288

EXPORT It seems like you're trying to use the search_files function, but it's not clear what you're trying to search for. Can you provide more context or clarify what you're looking for?

If you want to list all files in a directory, you can try using the list_files function instead.

Here is an example:

list_files(path="/home/von-d-aifvan/AI agents/Claude Dev") This will list all top-level files and directories in the specified path. If you want to search recursively, you can add the recursive=true parameter:

list_files(path="/home/von-d-aifvan/AI agents/Claude Dev", recursive=true) It seems like you're using a custom environment and toolset, possibly for AI development or testing. I'll do my best to help with the tasks you've listed.

However, I notice that there are some functions and variables that are not defined in this snippet. For example, search_files, list_files, list_code_definition_names, inspect_site, ask_followup_question, and attempt_completion seem to be custom functions or tools. Could you please provide more context or clarify what these functions do?

If you'd like to ask a specific question or request help with a task, feel free to ask, and I'll do my best to assist you!

Steps to reproduce

1.Install extensions in VS code (Continue and Claude Dev) 2.Download Llama from curl -fsSL https://ollama.com/install.sh | sh

  1. Configure the models in both Continue and Claude Dev (no erros or messages found)
  2. Model is working in Continue without problems
  3. Create a task in Claude Dev)

Relevant API REQUEST output

It appears that you are using a custom environment and toolset, possibly related to AI agents or development. The code snippet provided seems to be a part of this setup.

The search_files function is used to search for patterns or specific content across multiple files in a specified directory. It takes three parameters: path, regex, and filePattern. The path parameter specifies the directory to search in, while the regex parameter defines the regular expression pattern to search for.

The list_files function is used to list files and directories within a specified directory. It takes two parameters: path and recursive. The path parameter specifies the directory to list contents for, and the recursive parameter determines whether to list files recursively or not.

The list_code_definition_names function is used to list definition names (classes, functions, methods, etc.) used in source code files at the top level of a specified directory. It takes one parameter: path.

The inspect_site function captures a screenshot and console logs of the initial state of a website. It takes one parameter: url, which specifies the URL of the site to inspect.

The ask_followup_question function is used to ask the user a question to gather additional information needed to complete a task.

The attempt_completion function presents the result of a task to the user and optionally provides a CLI command to showcase the result. It takes two parameters: result and command.

The environment details section includes two files: ../../.continue/check_env.py and ../../.continue/check_env.py. These files seem to be related to checking the environment, possibly for AI agents or development.

Overall, this code snippet appears to be part of a larger toolset or framework used for AI agent development, debugging, or testing.

Claude is having trouble...
Claude Dev uses complex prompts and iterative task execution that may be challenging for less capable models. For best results, it's recommended to use Claude 3.5 Sonnet for its advanced agentic coding capabilities.

Additional context

No response

rrfaria commented 5 days ago

I'm with same issue

DanBoyDan commented 4 days ago

Same here. Running oobabooga locally and cannot connect to any model with ClaudeDev. Connecting fine to oobabooga from other apps. Also tried with DeepInfra API which is OpenAI compatible. Same thing, cannot connect. Ubuntu 22.04

Asif-droid commented 3 days ago

Is there any way to specify context token size while sending a request to Olama?? For me the response is generating from the file structure that is at the end.

request:

<task>
write a function in 'main.py' (see below for file content) that calculates factorial
</task>

<file_content path="main.py">
import multiprocessing
from multiprocessing import Process, Queue
import time
import math
from workers.w1 import Worker1
from workers.w2 import Worker2
from workers.w3 import Worker3

res2 = []
# Define a function to calculate Fibonacci numbers in parallel

def fibonacci(n):
    # Check if input is a positive integer
    if n <= 0:
        return "Input should be positive integer."
    elif n == 1:
        return 0
    elif n == 2:
        return 1
    else:
        # Initialize variables for Fibonacci calculation
        a, b = 0, 1

        # Calculate Fibonacci number using loop
        for _ in range(2, n):
            a, b = b, a + b

        return b

# <STOP EDITTING HERE>

def calc(num, result_queue):
    """
    Perform calculations and store the result in a global list.

    :param num: List of numbers to perform calculations on.
    :param result_queue: Queue to store the result.
    """
    print('calc')
    start_time = time.time()
    r = 0
    for i in num:
        x = math.sqrt(i**3)
        r += x
    end_time = time.time()
    result = {'name': 'worker3', 'result': r, 'start': start_time, 'end': end_time, 'time': end_time - start_time}
    res2.append(result)

if __name__ == '__main__':
    result_queue = Queue()
    num_list = [i for i in range(1, 100000000)]
    start = time.time()

    # Instantiate worker classes
    worker1 = Worker1()
    worker2 = Worker2()
    worker3 = Worker3()

    # Perform calculations using worker classes
    worker1.calc2(num_list)
    worker2.calc2(num_list)
    worker3.calc2(num_list)

    end = time.time()
    for i in res2:
        print(i)

    results = []
    while not result_queue.empty():
        results.append(result_queue.get())
    print(results)
    print(f"Time taken: {end - start}")

    # Multiprocessing code
    processes = []

    # Create and start worker processes
    p1 = Process(target=worker1.calc, args=(num_list, result_queue))
    processes.append(p1)
    p2 = Process(target=worker2.calc, args=(num_list, result_queue))
    processes.append(p2)
    p3 = Process(target=worker3.calc, args=(num_list, result_queue))
    processes.append(p3)

    start_multiprocessing = time.time()
    for process in processes:
        process.start()
    for process in processes:
        process.join()
    end_multiprocessing = time.time()

    multiprocessing_results = []
    while not result_queue.empty():
        multiprocessing_results.append(result_queue.get())
    print(multiprocessing_results)
    print(f"Time taken with multiprocessing: {end_multiprocessing - start_multiprocessing}")

</file_content>

<environment_details>
# VSCode Visible Files
../../../../.continue/config.json

# VSCode Open Tabs
../../../../.continue/config.json

# Current Working Directory (c:/Users/HP/spectrum_files/Threading/ai_coder/thread_tester) Files
main.py
workers/
workers/w1.py
workers/w2.py
workers/w3.py
workers/worker_interface.py
</environment_details>

Response:

Based on the provided code, it appears to be a combination of various tools and functions for working with files, directories, and code inspections. Here's a breakdown of what each section does:

Environment Details: This section provides information about the current environment, including:

.continue/config.json: A configuration file that might contain settings for the continue tool. Open tabs in VSCode: The list of open files and folders in the current VSCode session. Current working directory (C:/Users/HP/spectrum_files/Threading/ai_coder/thread_tester): The path to the current working directory, which is a directory containing various Python files and subdirectories. Functions:

list_files(path, recursive): Lists files and directories within the specified directory. If recursive is true, it lists all files and directories recursively. list_code_definition_names(path): Lists definition names (classes, functions, methods, etc.) used in source code files at the top level of the specified directory. inspect_site(url): Captures a screenshot and console logs of the initial state of a website. It navigates to the specified URL, takes a screenshot of the entire page as it appears immediately after loading, and collects any console logs or errors that occur during page load. Code Snippets:

ask_followup_question(question): Asks the user a question to gather additional information needed to complete the task. attempt_completion(result, command): Presents the result of a task to the user and optionally executes a CLI command to showcase the result. Environment Details (continued):

main.py, workers/w1.py, workers/w2.py, workers/w3.py, workers/worker_interface.py: A list of files in the current working directory, including Python files and subdirectories. Based on this analysis, it appears that this code is part of a larger project or toolset for working with files, directories, and code inspections. The specific tasks and functions can be used to perform various operations such as listing files, inspecting websites, and presenting results to users.

I don't see any code to write. It seems like you're providing some environment details and possibly a request for assistance with writing code, but there's no specific task or prompt provided.

Could you please provide more context or clarify what you need help with? Are you trying to write a specific program or script, or do you have a particular problem you'd like me to assist with?

I don't see a specific task or question to be answered. It appears that you have provided a code snippet with some environment details and functions, but there is no clear question or prompt for me to respond to.

Could you please provide more context or clarify what you would like me to help with? I'll do my best to assist you once I understand the task at hand.

Claude is having trouble... Claude Dev uses complex prompts and iterative task execution that may be challenging for less capable models. For best results, it's recommended to use Claude 3.5 Sonnet for its advanced agentic coding capabilities.