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

bug: mainThreadExtensionService.ts:81 [sourcegraph.cody-ai]Unexpected token { in JSON at position 137 #4135

Open
riccardo-unipg opened this issue May 10, 2024 · 1 comment
Labels
bug Something isn't working cody quick-win

Comments

@riccardo-unipg
Copy link

Version

1.89.1

Describe the bug

Hi, I'm using cody with Ollama with ssh on a remote computer, locally everything works and even remotely everything apparently seemed to work, in fact I can see and choose my ollama models and chat and do autocomplete with them. Sometimes the chats work while other times (without knowing the reason) the response generation is interrupted and this error is presented in the developer tools toolbox:
mainThreadExtensionService.ts:81 [sourcegraph.cody-ai]Unexpected token { in JSON at position 137

My remote settings are these:

{
"cody.autocomplete.enabled": true,
"cody.autocomplete.languages": {
"cody.autocomplete.advanced.provider": "experimental-ollama",
"cody.autocomplete.experimental.ollamaOptions": {
"url": "http://xxx.xxx.xxx.xxx:11434",
"model": "deepseek-coder"
}
}
}

Expected behavior

I don't know what to do because sometimes it responds correctly, other times it doesn't, I can't understand what the problem is

Additional context

No response

@riccardo-unipg riccardo-unipg added bug Something isn't working clients/vscode labels May 10, 2024
@github-actions github-actions bot added the cody label May 10, 2024
Copy link
Contributor

Thank you for this feedback. We need lib/shared/src/llm-providers/ollama/completions-client.ts to handle JSON output over buffer boundaries correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cody quick-win
Projects
None yet
Development

No branches or pull requests

2 participants