Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using tabby without creating an account #3236

Closed
fruffy opened this issue Oct 4, 2024 · 5 comments
Closed

Using tabby without creating an account #3236

fruffy opened this issue Oct 4, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@fruffy
Copy link

fruffy commented Oct 4, 2024

Please describe the feature you want

Hi, we are looking into integration of tabby with Sublime-Text, but we ran into problems with the server requiring accounts and/or authentication. Is there a way to disable this workflow? We would just like to connect to the server using the Language Server Protocol.

Additional context
sublimelsp/LSP#2520 (comment)
This is the workflow we set up where we ran into this problem.


Please reply with a 👍 if you want this feature.

@fruffy fruffy added the enhancement New feature or request label Oct 4, 2024
@wsxiaoys
Copy link
Member

If you want to run Tabby without the user management feature, you can disable the entire "webserver feature" by passing the --no-webserver argument.

@jwortmann
Copy link

jwortmann commented Oct 23, 2024

I have tried that, but it still does not work. It seems that tabby still expects some authorization token from tabby-agent (I assume).

tabby version 0.18.0, started via tabby.exe serve --no-webserver

It always returns an empty response to textDocument/inlineCompletion (no items).

I've tried with this Python file:

# find max element in array
def findMaxElement(arr):
    

And this is what tabby-agent logs via window/logMessage:

INFO: [TabbyAgent] Initializing...
INFO: [TabbyAgent] Applying updated config...
DEBUG: [CaCert] Loading extra certs from win-ca.
DEBUG: [TabbyAgent] Health check request: GET http://localhost:8080/v1/health. [fbaafe8f-cb03-4b93-969d-a028cdca3f24]
DEBUG: [TabbyAgent] Health check response status: 200. [fbaafe8f-cb03-4b93-969d-a028cdca3f24]
INFO: [TabbyAgent] Status changed: ready.
INFO: [TabbyAgent] Completed applying updated config.
INFO: [TabbyAgent] Initialized.
INFO: [CodeSearch] Created code search engine for recently changed files.
DEBUG: [LspServer] Collecting snippets from recently changed files...
DEBUG: [LspServer] Completed collecting snippets from recently changed files.
DEBUG: [TabbyAgent] Function providedCompletions called.
INFO: [TabbyAgent] Fetching completion...
DEBUG: [TabbyAgent] Completion request: POST http://localhost:8080/v1/completions. [a65a9c0d-9f9b-4a40-aeb3-c8bc9f9d4adb]
DEBUG: [TabbyAgent] Completion response status: 501. [a65a9c0d-9f9b-4a40-aeb3-c8bc9f9d4adb]
ERROR: [TabbyAgent] Completion request failed. [a65a9c0d-9f9b-4a40-aeb3-c8bc9f9d4adb] {
  "error": {
    "name": "HttpError",
    "status": 501,
    "statusText": "Not Implemented",
    "response": {}
  }
}
DEBUG: [TabbyAgent] Health check request: GET http://localhost:8080/v1/health. [db6fc335-85a7-49f5-8270-f0b7743056ce]
DEBUG: [CompletionCache] Updating completion cache, cache number before updating: 0
DEBUG: [CompletionCache] Updated entries number: 1
DEBUG: [CompletionCache] Completion cache updated, cache number: 1
INFO: [TabbyAgent] Completed processing completions, choices returned: 0.
DEBUG: [TabbyAgent] Health check response status: 200. [db6fc335-85a7-49f5-8270-f0b7743056ce]

@wsxiaoys
Copy link
Member

wsxiaoys commented Oct 23, 2024

Based on the error message you received (501 - Not Implemented), it appears that the issue may stem from not initiating Tabby with the --model parameter specified. Can you share the command you used to start Tabby?

@jwortmann
Copy link

jwortmann commented Oct 23, 2024

I see. I did not pass the model explicitly, but now I've adjusted the command to start tabby via tabby.exe serve --model StarCoder-1B --no-webserver.

Now I get a timeout after 30 seconds (and therefore no items in the response). I'm using the CPU version just for testing to implement the inline completions on the client side.

INFO: [CompletionProvider] Fetching completion...
DEBUG: [TabbyApiClient] Completion request: POST http://localhost:8080/v1/completions. [d03b3e72-8d22-4faf-80be-70371abda04f]
DEBUG: [TabbyApiClient] Completion response status: 408. [d03b3e72-8d22-4faf-80be-70371abda04f]
DEBUG: [TabbyApiClient] Completion request timed out. [d03b3e72-8d22-4faf-80be-70371abda04f]

I guess I would need to use the CUDA version of tabby instead. Is the timeout for the CPU version expected?

@jwortmann
Copy link

Update: I've installed the CUDA version (...-cuda122.zip) and I can confirm that the inline completion request works correctly now:

{
    "isIncomplete": true,
    "items": [
        {
            "insertText": "max = arr[0]\n    for i in range(1, len(arr)):\n        if arr[i] > max:\n            max = arr[i]\n    return max",
            "range": {
                "start": {
                    "line": 2,
                    "character": 4
                },
                "end": {
                    "line": 2,
                    "character": 4
                }
            },
            "data": {
                "eventId": {
                    "completionId": "cmpl-8aafcc0e-812f-4cac-bac6-3bb88bc3f6fa",
                    "choiceIndex": 0
                }
            }
        }
    ]
}

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants