caikit / caikit-nlp

Apache License 2.0
12 stars 45 forks source link

Lazy model connection & x-route-info #363

Closed mynhardtburger closed 3 months ago

mynhardtburger commented 3 months ago

This PR adds support for respecting a TGIS hostname override (x-route-info header/metadata).

This is achieved by lazily registering the model connection with the TGISBackend when .run()/run_stream_out()/run_tokenizer() is called. The x-route-info header/metadata is read from the context arg.

Additionally:

Depends on caikit-tgis-backend>=0.1.33