Skip to content

Commit

Permalink
Merge pull request #25 from agoncal/agoncal/expose-azure-tokenizer
Browse files Browse the repository at this point in the history
Expose newly created AzureOpenAITokenizer
  • Loading branch information
langchain4j authored Jun 7, 2024
2 parents fad12ab + 4df1644 commit 20a79ef
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
import dev.langchain4j.model.azure.AzureOpenAiEmbeddingModel;
import dev.langchain4j.model.azure.AzureOpenAiImageModel;
import dev.langchain4j.model.azure.AzureOpenAiStreamingChatModel;
import dev.langchain4j.model.azure.AzureOpenAiTokenizer;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
Expand Down Expand Up @@ -148,4 +150,11 @@ AzureOpenAiImageModel openAiImageModel(Properties properties) {
}
return builder.build();
}


@Bean
@ConditionalOnMissingBean
AzureOpenAiTokenizer openAiTokenizer() {
return new AzureOpenAiTokenizer();
}
}

0 comments on commit 20a79ef

Please sign in to comment.