Open hongbo-miao opened 4 days ago
@hongbo-miao, it appears that the issue is related to stopSequences. According to the AWS documentation, the number of stopSequences should be between 0 and 4. The values for stopSequences are derived from stop. I̶ b̶e̶l̶i̶e̶v̶e̶ i̶f̶ y̶o̶u̶ a̶d̶d̶ c̶o̶m̶p̶l̶e̶t̶i̶o̶n̶O̶p̶t̶i̶o̶n̶s̶ a̶s̶ s̶h̶o̶w̶n̶ b̶e̶l̶o̶w̶, t̶h̶e̶ i̶s̶s̶u̶e̶ m̶i̶g̶h̶t̶ b̶e̶ r̶e̶s̶o̶l̶v̶e̶d̶.
"tabAutocompleteModel": {
"title": "Tab Autocomplete",
"provider": "openai",
"apiBase": "https://litellm.example.com",
"apiKey": "xxx",
"model": "claude-3-5-sonnet",
"maxStopWords": 4,
"completionOptions": {
"stop": []
}
}
@sestinj @Patrick-Erichsen, I believe the issue lies in the following lines: https://github.com/continuedev/continue/blob/4124c214eb885842d6b5d975dfc00650a518bd7f/core/autocomplete/completionProvider.ts#L637-L646
We likely need to limit the number of items in the stop array by introducing something like maxStopWords here: https://github.com/continuedev/continue/blob/4124c214eb885842d6b5d975dfc00650a518bd7f/core/llm/llms/Bedrock.ts#L114 If you'd like, I'm happy to take care of the fix. :)
Thanks @malaki12003 I can confirm adding extra completionOptions
still not work. So may need some source code updates.
"tabAutocompleteModel": {
...
"maxStopWords": 4,
"completionOptions": {
"stop": []
}
}
Hi @malaki12003 , that would be awesome! 😁 I think your proposed solution makes sense.
@Patrick-Erichsen I’ve added comments in the code to highlight areas for potential future improvements. I believe incorporating TODOs in the code will be helpful for tracking enhancements and future refactoring efforts.
Before submitting your bug report
Relevant environment info
Description
My Continue "chat" and "edit" functions work well. Thanks! ☺️
Now I am trying to set up autocomplete now. Here is my setup:
AWS Bedrock -> LiteLLM (proxy & gateway) -> Continue
Based on the error I got
I tried to add
"maxStopWords": 4
based on https://github.com/continuedev/continue/blob/4124c214eb885842d6b5d975dfc00650a518bd7f/extensions/vscode/config_schema.json#L267-L271which looks like
But I still got same error. So this
"maxStopWords": 4
seems not functioning.To reproduce
Log output
Continue log (Jetbrains
~/.continue/logs/core.log
):LiteLLM log: https://gist.github.com/hongbo-miao/b10b9785997e6078b9290cb30af5ccf2
Potential Related Issues