Version 2.0
Java 25, Spring Boot 4, Use RestClient with JDK client backend
This commit is contained in:
@@ -11,7 +11,7 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.web.reactive.function.client.WebClient;
|
||||
import org.springframework.web.client.RestClient;
|
||||
|
||||
import de.extio.lmlib.profile.ModelCategory;
|
||||
import de.extio.lmlib.profile.ModelProfileService;
|
||||
@@ -28,8 +28,8 @@ public class TokenizerTest {
|
||||
private ModelProfileService modelProfileService;
|
||||
|
||||
@Autowired
|
||||
@Qualifier("lmLibWebClientBuilder")
|
||||
private WebClient.Builder webClientBuilder;
|
||||
@Qualifier("lmLibRestClientBuilder")
|
||||
private RestClient.Builder restClientBuilder;
|
||||
|
||||
@Test
|
||||
void jTokkit() throws Exception {
|
||||
@@ -48,7 +48,7 @@ public class TokenizerTest {
|
||||
@Disabled("Requires llama.cpp model profile")
|
||||
@Test
|
||||
void llamaServer() throws Exception {
|
||||
final var tokenizer = new LlamaServerTokenizer(this.webClientBuilder);
|
||||
final var tokenizer = new LlamaServerTokenizer(this.restClientBuilder);
|
||||
final var profile = this.modelProfileService.getModelProfile(ModelCategory.MEDIUM.getModelProfile());
|
||||
|
||||
assertEquals(21, tokenizer.count(TEXT, profile));
|
||||
|
||||
Reference in New Issue
Block a user