Skip to content

Feature/xiaobuboy #35

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spring-ai-rag/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ User-Agent: HTTPie
"fieldName": "content",
"dataType": "VarChar",
"elementTypeParams": {
"max_length": 512000
"max_length": 65535
}
},
{
Expand Down Expand Up @@ -111,4 +111,4 @@ User-Agent: HTTPie
./mvnw spring-boot:run
```
如果你使用的是 IntelliJ IDEA,可以直接运行 `SpringAiRagApplication` 类。
启动之后先执行 embedding 接口,将
启动之后先执行 embedding 接口,将
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class LangChainTextSplitter {
public void embedding() {
try {
TextSplitter splitter = new TokenTextSplitter();
URL path = LangChainTextSplitter.class.getClassLoader().getResource("classpath:files/test.md");
URL path = LangChainTextSplitter.class.getClassLoader().getResource("files/test.md");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里有什么问题嘛?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你试一下可以正常运行吗

String mdContent = Files.readString(Paths.get(path.toURI()), StandardCharsets.UTF_8);
Document doc = new Document(mdContent);
List<Document> docs = splitter.split(doc);
Expand Down