mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-21 02:11:29 +00:00
fix: build errors
This commit is contained in:
parent
8af6be9e3e
commit
d0db35153a
3 changed files with 7 additions and 3 deletions
|
|
@ -26,7 +26,8 @@ public class CodeCompletionRequestProvider {
|
|||
|
||||
public LlamaCompletionRequest buildLlamaRequest() {
|
||||
InfillPromptTemplate promptTemplate = getLlamaInfillPromptTemplate();
|
||||
String prompt = promptTemplate.buildPrompt(details.getPrefix(), details.getSuffix());
|
||||
String prompt = promptTemplate.buildPrompt(
|
||||
new InfillRequestDetails(details.getPrefix(), details.getSuffix(), null));
|
||||
return new LlamaCompletionRequest.Builder(prompt)
|
||||
.setN_predict(MAX_TOKENS)
|
||||
.setStream(true)
|
||||
|
|
|
|||
|
|
@ -88,7 +88,10 @@ public final class CodeCompletionServiceOld implements Disposable {
|
|||
return;
|
||||
}
|
||||
|
||||
var request = InfillRequestDetails.Companion.fromDocumentWithMaxOffset(document, offset);
|
||||
var prefix = document.getText(new TextRange(0, offset));
|
||||
var suffix = document.getText(new TextRange(offset, document.getTextLength()));
|
||||
|
||||
var request = InfillRequestDetails.Companion.withoutContext(prefix, suffix);
|
||||
if (Stream.of(request.getSuffix(), request.getPrefix()).anyMatch(String::isEmpty)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue