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

Fix broken tokenizer dependencies in main #77

Merged
merged 1 commit into from
May 19, 2023
Merged
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
1 change: 1 addition & 0 deletions integrations/pdf/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ java {

dependencies {
implementation(projects.xefCore)
implementation(projects.tokenizer)
implementation(libs.apache.pdf.box)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.xebia.functional.xef.pdf

import com.xebia.functional.tokenizer.ModelType
import com.xebia.functional.xef.agents.ParameterlessAgent
import com.xebia.functional.xef.llm.openai.LLMModel
import com.xebia.functional.xef.loaders.BaseLoader
import com.xebia.functional.xef.textsplitters.BaseTextSplitter
import com.xebia.functional.xef.textsplitters.TokenTextSplitter
Expand All @@ -11,7 +11,7 @@ import java.io.File

fun pdf(
file: File,
splitter: BaseTextSplitter = TokenTextSplitter(modelName = LLMModel.GPT_3_5_TURBO.name, chunkSize = 100, chunkOverlap = 50)
splitter: BaseTextSplitter = TokenTextSplitter(modelType = ModelType.GPT_3_5_TURBO, chunkSize = 100, chunkOverlap = 50)
): ParameterlessAgent<List<String>> =
ParameterlessAgent(name = "Get PDF content", description = "Get PDF Content of $file") {
val loader = PDFLoader(file)
Expand Down