Skip to content

Commit

Permalink
fixes test (wrong model contxt length)
Browse files Browse the repository at this point in the history
  • Loading branch information
Intex32 committed Nov 25, 2023
1 parent 253adba commit 066135e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ interface BaseChat : LLM {
"accessing maxContextLength requires model's context length to be of type MaxIoContextLength.Combined"
)

@Suppress("OVERRIDE_DEPRECATION") fun countTokens(text: String): Int
fun countTokens(text: String): Int

@Suppress("OVERRIDE_DEPRECATION") fun truncateText(text: String, maxTokens: Int): String
fun truncateText(text: String, maxTokens: Int): String

@Suppress("OVERRIDE_DEPRECATION") fun tokensFromMessages(messages: List<Message>): Int
fun tokensFromMessages(messages: List<Message>): Int
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ConversationSpec :
)
val vectorStore = scope.store

val modelAda = TestModel(responses = messages)
val modelAda = TestModel(responses = messages, contextLength = MaxIoContextLength.Combined(2049))

val totalTokens =
modelAda.tokensFromMessages(
Expand Down

0 comments on commit 066135e

Please sign in to comment.