Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨πŸ’₯ #153: Allow to pass multiple model-specific param overrides #264

Merged
merged 15 commits into from
Jun 5, 2024

Conversation

roma-glushko
Copy link
Member

@roma-glushko roma-glushko commented May 29, 2024

Allowing to pass multiple model-specific chat param overrides:

  • by model ID (a routing specific concept)
  • by provider model name

This PR prepares a ground for #185

Changes

  • Introduced a new concept/struct ChatParams that contains all param overrides for the specific modelName/modelID
  • Adjusted the LangModel interface to rely on ChatParams rather than the original request schema for both sync and stream chat API
  • Standardize on the chat message structure with two fields. Removed all duplicated structures
  • Fixed Ollama's broken/half-backed tests

@roma-glushko roma-glushko self-assigned this May 29, 2024
@roma-glushko roma-glushko added area:providers api:http area:api model:language type:refactoring type:breaking πŸ’₯ Introduces a breaking changes to API, configuration or behavior introduced before labels May 29, 2024
@roma-glushko roma-glushko linked an issue May 29, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 75.59055% with 62 lines in your changes missing coverage. Please review.

Project coverage is 66.35%. Comparing base (03f1805) to head (bca8c8f).
Report is 1 commits behind head on develop.

Files Patch % Lines
pkg/providers/bedrock/chat.go 54.16% 11 Missing ⚠️
pkg/api/schemas/chat_stream.go 0.00% 5 Missing ⚠️
pkg/providers/anthropic/chat.go 73.33% 3 Missing and 1 partial ⚠️
pkg/providers/ollama/chat.go 75.00% 3 Missing and 1 partial ⚠️
pkg/api/schemas/chat.go 88.88% 2 Missing and 1 partial ⚠️
pkg/providers/azureopenai/chat.go 86.95% 2 Missing and 1 partial ⚠️
pkg/providers/cohere/chat.go 72.72% 2 Missing and 1 partial ⚠️
pkg/providers/octoml/chat.go 88.88% 2 Missing and 1 partial ⚠️
pkg/providers/openai/chat.go 80.00% 2 Missing and 1 partial ⚠️
pkg/api/http/server.go 0.00% 2 Missing ⚠️
... and 14 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #264      +/-   ##
===========================================
- Coverage    66.98%   66.35%   -0.64%     
===========================================
  Files           79       82       +3     
  Lines         3659     3614      -45     
===========================================
- Hits          2451     2398      -53     
- Misses        1079     1094      +15     
+ Partials       129      122       -7     

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

@roma-glushko roma-glushko merged commit b80a3f9 into develop Jun 5, 2024
9 of 10 checks passed
@roma-glushko roma-glushko deleted the 153-multiple-template-overrides branch June 5, 2024 20:27
roma-glushko added a commit that referenced this pull request Jun 24, 2024
The first major update with breaking changes to the language chat schemas 
and begging of work on instrumenting the gateway with OpenTelemetry.

### Added

- πŸ”§ Use github.com/EinStack/glide as module name to support go install cmd (@gernest)
- βœ¨πŸ”§ Setup Open Telemetry Metrics and Traces (#237) (@gernest)
-  πŸ”§ #221 Add B3 trace propagator (#242) (@gernest)
- πŸ”§ #241 Support overriding OTEL resource attributes (#243) (@gernest)
- πŸ”§ #248 Disable span and metrics by default (#254) (@gernest)
- πŸ”§ #220 Instrument API server with observability signals (#255) (@gernest)
- πŸ”§ #164 Make client connection pool configurable across all providers (#251) (@daesu)
- πŸ”§ Instrument gateway process (#256) (@gernest)
- πŸ”§ #262: adding connection pool for chat request and response (#271) (@tom-fitz)

### Changed

- πŸ”§ #238 Implements human-readable durations in config (#253) (@ppmdo)
- πŸ”§ #266: removing omitempty from response definition (#267) (@tom-fitz)

#### Breaking Changes

- πŸ”§ πŸ’₯ #235: Extended the non-streaming chat error schema with new fields to give clients more context around the error (#236) (@roma-glushko)
- πŸ’₯ Convert all camelCase config fields to the snake_case in the provider configs (#260) (@roma-glushko)
- ✨πŸ’₯ #153: Allow to pass multiple model-specific param overrides (#264) (@roma-glushko)

### Fixed

- πŸ› #217: Set build info correctly in Glide images (#218) (@roma-glushko)

### Security

- πŸ”’ Updated golang to 1.22.4 to address CVE-2024-24790 (#276) (@STAR-173)

### Miscellaneous

- πŸ“ Defined a way to manage EinStack Glide project (#234) (@roma-glushko)
- πŸ‘· #219: Setup local telemetry stack with Jaeger, Grafana, VictoriaMetrics and OTEL Collector (#225) (@roma-glushko)
- πŸ‘·β€β™‚οΈ Added a new GH action to watch for glide activity stream (#239, #244) (@roma-glushko)
- ✨ Switched to the new docs (@roma-glushko)
- πŸ”§ #240: Automatically install air (#277, #270) (@ppmdo, @roma-glushko)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:http area:api area:providers model:language type:breaking πŸ’₯ Introduces a breaking changes to API, configuration or behavior introduced before type:refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Allow to specify more than one model message override
1 participant