Introduce hermesllm library to handle llm message translation (#501)

This commit is contained in:
Adil Hafeez 2025-06-10 12:53:27 -07:00 committed by GitHub
parent 96b583c819
commit 6c53510f49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 1693 additions and 690 deletions

View file

@ -1,6 +1,6 @@
use bytes::Bytes;
use common::api::open_ai::Models;
use common::configuration::LlmProvider;
use common::configuration::{IntoModels, LlmProvider};
use hermesllm::providers::openai::types::Models;
use http_body_util::{combinators::BoxBody, BodyExt, Full};
use hyper::{Response, StatusCode};
use serde_json;
@ -11,7 +11,7 @@ pub async fn list_models(
) -> Response<BoxBody<Bytes, hyper::Error>> {
let prov = llm_providers.clone();
let providers = (*prov).clone();
let openai_models = Models::from(providers);
let openai_models: Models = providers.into_models();
match serde_json::to_string(&openai_models) {
Ok(json) => {