Skip to content

Commit

Permalink
Adding opentelementry
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaland committed Oct 26, 2024
1 parent 81ce3b9 commit 275b403
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public Multi<String> chat(ChatBotRequest request) {
.getChatModel(request.getModelRequest());

// TODO: Make this configurable
Class<? extends BaseAIService> aiServiceClass = aiServicesFactory.getAiService(AIServicesFactory.HEALTHCARE_SERVICE);
Class<? extends BaseAIService> aiServiceClass = aiServicesFactory.getAiService(AIServicesFactory.MISTRAL7B_AI_SERVICE);

BaseAIService aiService = AiServices.builder(aiServiceClass)
.streamingChatLanguageModel(llm)
Expand All @@ -94,8 +94,8 @@ public Multi<String> chat(ChatBotRequest request) {
em.emit("\n\nSources used to generate this content:\n");
contentSources.forEach(content -> {
em.emit(content.textSegment().metadata().getString("source") + "\n");
log.info("Chat complete, traceId: " + traceId);
});
log.info("Chat complete, traceId: " + traceId);
em.complete();
})
.start();
Expand Down
6 changes: 5 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mistral.default.temp=0.8
############################################################
# Default OpenAI Model
############################################################
openai.default.url=https://vllm-predictor-composer-ai.apps.cluster-c4gwj.c4gwj.sandbox1157.opentlc.com/v1
openai.default.url= https://vllm-predictor-composer-ai-app.apps.cluster-c4gwj.c4gwj.sandbox1157.opentlc.com/v1
openai.default.apiKey=abc123
# openai.default.url=https://mistral-7b-instruct-v0-3-maas-apicast-production.apps.prod.rhoai.rh-aiservices-bu.com:443/v1
# openai.default.apiKey=<REPLACE_ME>
Expand Down Expand Up @@ -77,5 +77,9 @@ quarkus.liquibase-mongodb.change-log=db/changeLog.yml
quarkus.liquibase-mongodb.enabled=true
quarkus.liquibase-mongodb.migrate-at-start=true

# OpenTelemetry configuration
quarkus.opentelemetry.tracer.exporter.otlp.endpoint=http://localhost:4317
quarkus.opentelemetry.tracer.exporter.otlp.enabled=true

# Override Log Level with Environment Variable QUARKUS_LOG_LEVEL
quarkus.log.level=INFO

0 comments on commit 275b403

Please sign in to comment.