Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
bb77f61
Add initial client refactor code (wip)
declark1 Oct 1, 2024
3861b12
Add is_valid_hostname(), update hostname validation, infer protocol f…
declark1 Oct 2, 2024
3b9d4c3
Add detector type ADR
mdevino Oct 2, 2024
9495057
Rebase and add header passthrough to detectors, update tests
declark1 Oct 3, 2024
c27e37a
Apply health check related tweaks
declark1 Oct 3, 2024
ad1a562
Update openapi spec
declark1 Oct 4, 2024
9a615ef
Updates to align OpenAI Chat Completions with current spec and includ…
declark1 Oct 7, 2024
c19783b
Update docs/architecture/adrs/006-detector-type.md
declark1 Oct 7, 2024
975ee69
Update docs/architecture/adrs/006-detector-type.md
declark1 Oct 7, 2024
046e285
Update docs/architecture/adrs/006-detector-type.md
declark1 Oct 7, 2024
42d431b
Update docs/architecture/adrs/006-detector-type.md
declark1 Oct 7, 2024
4dd61fd
Rename TextContextChatDetector to TextChatDetector, update DetectorTy…
declark1 Oct 7, 2024
e7b6226
Drop provider from ChatGenerationConfig as it will always useopenai, …
declark1 Oct 7, 2024
355de7d
Split config validation rules into methods
declark1 Oct 8, 2024
ee1e782
Add health_service to DetectorConfig and ChatGenerationConfig, add he…
declark1 Oct 8, 2024
428c806
Move inner client creation back to client constructor
declark1 Oct 10, 2024
b78edf0
Merge pull request #220 from declark1/client-refactor
gkumbhat Oct 10, 2024
a7892fc
Initial opentelemetry setup for orchestrator (#221)
pscoro Oct 11, 2024
462d7ff
:bug: Fix whole_doc_chunker missing from client list
gkumbhat Oct 14, 2024
96f0933
:recycle: Refactor to implement whole_doc_chunker separately
gkumbhat Oct 14, 2024
65babf9
:art: Fix formatting
gkumbhat Oct 15, 2024
0bf8e20
:truck: Rename default model id for chunker to default chunker id
gkumbhat Oct 15, 2024
4965141
Merge pull request #229 from gkumbhat/fix_whole_doc_chunk
gkumbhat Oct 15, 2024
a9e62c2
missing licence comments on recent new files (#232)
pscoro Oct 17, 2024
7587916
Implement chat detection endpoint
mdevino Oct 14, 2024
61f2402
Replace openai Message by String
mdevino Oct 15, 2024
acbf718
Add detector_params
mdevino Oct 15, 2024
0fa1324
Revert "Replace openai Message by String"
mdevino Oct 15, 2024
b923b94
Add header filtering
mdevino Oct 17, 2024
acd7c1f
Log chat detector requests and responses
mdevino Oct 17, 2024
5959dd3
Add content type validation
mdevino Oct 17, 2024
c793698
Update src/orchestrator/unary.rs
mdevino Oct 18, 2024
ac4008a
Update src/orchestrator/unary.rs
mdevino Oct 18, 2024
3f96193
Extract chat endpoint as a constant
mdevino Oct 18, 2024
47a8dbd
Split text-specific validation
mdevino Oct 18, 2024
68101a8
Merge pull request #233 from mdevino/chat-standalone-endpoint
gkumbhat Oct 18, 2024
36d33cb
:bug: Fix threshold getting passed through beyond orchestrator proces…
gkumbhat Oct 22, 2024
a9ae040
:truck: Rename threshold to pop threshold to make it intuitive
gkumbhat Oct 23, 2024
b9a64fc
Merge pull request #236 from gkumbhat/fix_threshold_passthrough
gkumbhat Oct 23, 2024
6a58107
:sparkles::bug: Pass on non-threshold detector parameters (#235)
evaline-ju Oct 23, 2024
4aa4c87
client instrumentation and replacing request_id with trace_id
pscoro Oct 15, 2024
6a96c9a
traceparent header creation
pscoro Oct 16, 2024
f6740d7
revised and finished traceparent propagation
pscoro Oct 17, 2024
23c439e
some clean up of imports
pscoro Oct 17, 2024
1ed58ad
tracing_utils import nit
pscoro Oct 17, 2024
a144c8e
remove unneeded tracing_utils change
pscoro Oct 17, 2024
a0e85ee
rebase fix and nits
pscoro Oct 28, 2024
e8d0b5d
doc comments
pscoro Oct 29, 2024
9a5217f
Merge pull request #231 from pscoro/paul/client-telemetry
evaline-ju Oct 30, 2024
521c80f
Add OpenAiClient stream handling, update types (#230)
declark1 Oct 30, 2024
f2010e1
added error messages to various unwraps (#243)
resoluteCoder Nov 4, 2024
c15b2a2
Implement Chat Completions API (#240)
declark1 Nov 5, 2024
b47c0c9
:memo: Streaming content API (#246)
evaline-ju Nov 7, 2024
774cdaa
:bug: Update stream content API with intended response (#251)
evaline-ju Nov 11, 2024
f5a877a
Add client for Caikit-NLP on http protocol
christinaexyou Nov 19, 2024
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
190 changes: 190 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,24 @@ path = "src/main.rs"

[dependencies]
anyhow = "1.0.86"
async-trait = "0.1.81"
async-stream = "0.3.5"
axum = { version = "0.7.5", features = ["json"] }
axum-extra = "0.9.3"
clap = { version = "4.5.15", features = ["derive", "env"] }
futures = "0.3.30"
ginepro = "0.8.1"
http-serde = "2.1.1"
hyper = { version = "1.4.1", features = ["http1", "http2", "server"] }
hyper-util = { version = "0.1.7", features = ["server-auto", "server-graceful", "tokio"] }
mio = "1.0.2"
opentelemetry = { version = "0.24.0", features = ["trace", "metrics"] }
opentelemetry-http = { version = "0.13.0", features = ["reqwest"] }
opentelemetry-otlp = { version = "0.17.0", features = ["http-proto"] }
opentelemetry_sdk = { version = "0.24.1", features = ["rt-tokio", "metrics"] }
prost = "0.13.1"
reqwest = { version = "0.12.5", features = ["blocking", "rustls-tls", "json"] }
reqwest-eventsource = "0.6.0"
rustls = {version = "0.23.12", default-features = false, features = ["std"]}
rustls-pemfile = "2.1.3"
rustls-webpki = "0.102.6"
Expand All @@ -36,13 +44,13 @@ tokio = { version = "1.39.2", features = ["rt", "rt-multi-thread", "parking_lot"
tokio-rustls = { version = "0.26.0" }
tokio-stream = { version = "0.1.15", features = ["sync"] }
tonic = { version = "0.12.1", features = ["tls", "tls-roots", "tls-webpki-roots"] }
tower-http = { version = "0.5.2", features = ["trace"] }
tower-service = "0.3"
tracing = "0.1.40"
tracing-opentelemetry = "0.25.0"
tracing-subscriber = { version = "0.3.18", features = ["json", "env-filter"] }
url = "2.5.2"
uuid = { version = "1.10.0", features = ["v4", "fast-rng"] }
async-trait = "0.1.81"
async-stream = "0.3.5"

[build-dependencies]
tonic-build = "0.12.1"
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG UBI_MINIMAL_BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal
ARG UBI_BASE_IMAGE_TAG=latest
ARG PROTOC_VERSION=26.0
ARG CONFIG_FILE=config/config.yaml

## Rust builder ################################################################
# Specific debian version so that compatible glibc version is used
Expand All @@ -23,10 +24,10 @@ RUN rustup component add rustfmt
## Orchestrator builder #########################################################
FROM rust-builder as fms-guardrails-orchestr8-builder

COPY build.rs *.toml LICENSE /app
COPY config/ /app/config
COPY protos/ /app/protos
COPY src/ /app/src
COPY build.rs *.toml LICENSE /app/
COPY ${CONFIG_FILE} /app/config/config.yaml
COPY protos/ /app/protos/
COPY src/ /app/src/

WORKDIR /app

Expand All @@ -50,7 +51,7 @@ RUN cargo fmt --check
FROM ${UBI_MINIMAL_BASE_IMAGE}:${UBI_BASE_IMAGE_TAG} as fms-guardrails-orchestr8-release

COPY --from=fms-guardrails-orchestr8-builder /app/bin/ /app/bin/
COPY config /app/config
COPY ${CONFIG_FILE} /app/config/config.yaml

RUN microdnf install -y --disableplugin=subscription-manager shadow-utils compat-openssl11 && \
microdnf clean all --disableplugin=subscription-manager
Expand Down
16 changes: 13 additions & 3 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ generation:
service:
hostname: localhost
port: 8033
# Generation server used for chat endpoints
# chat_generation:
# service:
# hostname: localhost
# port: 8080
# # health_service:
# Any chunker servers that will be used by any detectors
chunkers:
# Chunker ID/name
Expand All @@ -26,11 +32,16 @@ chunkers:
detectors:
# Detector ID/name to be used in user requests
hap-en:
# Detector type (text_contents, text_generation, text_chat, text_context_doc)
type: text_contents
service:
hostname: https://localhost/api/v1/text/contents # Full url / endpoint currently expected
hostname: localhost
port: 8080
# TLS ID/name, optional (detailed in `tls` section)
tls: detector
health_service:
hostname: localhost
port: 8081
# Chunker ID/name from `chunkers` section if applicable
chunker_id: en_regex
# Default score threshold for a detector. If a user
Expand All @@ -53,8 +64,7 @@ tls:
detector_bundle_no_ca:
cert_path: /path/to/client-bundle.pem
insecure: true

# Following section can be used to configure the allowed headers that orchestrator will pass to
# NLP provider and detectors. Note that, this section takes header keys, not values.
# passthrough_headers:
# - header-key
# - header-key
Loading