-
Notifications
You must be signed in to change notification settings - Fork 1
[Fix] Ollama RAG 응답 지연·언어 혼입·컷오프 수정 #215
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c3d4238
chore: #210 Ollama를 Docker에서 macOS 네이티브로 전환
kangcheolung 8345ffa
fix: #210 Ollama RAG 응답 지연·언어 혼입·컷오프 수정
kangcheolung 8e9d4d8
test: #210 Ollama RAG 수정에 대한 백엔드 테스트 보강
kangcheolung 0ab205c
fix: #210 근거 문서 없음 상태에서 검색결과 대체 노출 제거
kangcheolung 551d611
test: #210 citations 숨김 프론트 테스트 갱신
kangcheolung 07b3f2e
docs: #210 RAG 타임아웃 수정 설계 문서 작성 및 동기화
kangcheolung c568465
fix: #210 스트림 정지 시 IOException 복구, 코드 스팬 물음표/느낌표 오탐 제거, 무관 안내 문구 메아리 수정
kangcheolung 41b4cfb
test: #210 스트림 정지 부분 답변 보존, 코드 스팬 물음표/느낌표 트리밍, 무관 문구 메아리 회귀 테스트 추가
kangcheolung 2a42af0
docs: #210 스트림 정지 복구·물음표 확장·메아리 문구 수정 내용 설계 문서 동기화, README Ollama 설치 …
kangcheolung File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 21 additions & 1 deletion
22
...nd/src/main/java/com/opensource/docgrid/domain/rag/dto/request/OllamaGenerateRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,24 @@ | ||
| package com.opensource.docgrid.domain.rag.dto.request; | ||
|
|
||
| public record OllamaGenerateRequest(String model, String prompt, boolean stream) { | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
|
||
| public record OllamaGenerateRequest( | ||
| String model, | ||
| String prompt, | ||
| boolean stream, | ||
| // 채팅 템플릿(및 그에 딸린 tool-call PEG 파서)을 거치지 않고 프롬프트를 그대로 전달한다. | ||
| // 템플릿을 타면 답변에 섞인 백틱(`ls` 등) 코드 표기를 모델이 tool-call 시도로 오인해 | ||
| // 생성이 done:false로 중간에 끊기는 문제가 있었다. | ||
| boolean raw, | ||
| @JsonProperty("keep_alive") String keepAlive, | ||
| OllamaGenerateOptions options | ||
| ) { | ||
| public record OllamaGenerateOptions( | ||
| @JsonProperty("num_predict") int numPredict, | ||
| double temperature, | ||
| @JsonProperty("top_p") double topP, | ||
| @JsonProperty("repeat_penalty") double repeatPenalty, | ||
| @JsonProperty("repeat_last_n") int repeatLastN | ||
| ) { | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.