-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Working with T-Systems OpenAI interface, I have found that it delivering also metadata on models().getList() request, which are missing in Simple-Openai API.
Here is the example of one model Info:
OpenAiListModelsResponse(object=list, data=[OpenAiListModelsResponse.ModelInfo(id=Llama-3.3-70B-Instruct, object=model, created=Wed Jan 21 10:01:19 CET 1970, ownedBy=T-Systems International, metaData=OpenAiListModelsResponse.Metadata(modelType=LLM, sourceType=OPEN SOURCE, maxSequenceLength=128000, hiddenSize=0, maxOutputLength=0, deploymentRegion=otc-germany, location=otc-germany, license=https://www.llama.com/llama3_3/license/, displayName=Meta LLama 3.3 70B, deploymentCountry=Germany, EU, inputModalities=[text], outputModalities=[text], isExternallyHosted=false, endOfLifeDate=null), root=Llama-3.3-70B-Instruct, parent=null, permission=[OpenAiListModelsResponse.Permission(id=modelperm-b6492ab95c7e4ffab5d152ea72c144c9, object=model_permission, created=Wed Jan 21 10:01:19 CET 1970, allowCreateEngine=false, allowSampling=true, allowLogprobs=true, allowSearchIndices=false, allowView=true, allowFineTuning=false, organization=T-Systems International, group=null, isBlocking=false)]), ..
Both metadata and permissions are missing in io.github.sashirestela.openai.domain.model.Model class.
Please add those, as the metadata is very important for my project, and actually I have to send a raw request and parse the data outside of simple-openai.
Here are my metadata and permissions classes;
@Getter
@tostring
public static class ModelInfo {
private String id;
private String object;
private Date created;
@JsonProperty("owned_by")
private String ownedBy;
@JsonProperty("meta_data")
private Metadata metaData;
private String root;
private String parent;
private List permission;
}
@Getter
@tostring
public static class Metadata {
@JsonProperty("model_type")
private String modelType;
@JsonProperty("source_type")
private String sourceType;
@JsonProperty("max_sequence_length")
private Integer maxSequenceLength;
@JsonProperty("hidden_size")
private Integer hiddenSize;
@JsonProperty("max_output_length")
private Integer maxOutputLength;
@JsonProperty("deployment_region")
private String deploymentRegion;
private String location;
private String license;
@JsonProperty("display_name")
private String displayName;
@JsonProperty("deployment_country")
private String deploymentCountry;
@JsonProperty("input_modalities")
private List inputModalities;
@JsonProperty("output_modalities")
private List outputModalities;
@JsonProperty("is_externally_hosted")
private Boolean isExternallyHosted;
@JsonProperty("end_of_life_date")
private Date endOfLifeDate;
}
@Getter
@ToString
public static class Permission {
private String id;
private String object;
private Date created;
@JsonProperty("allow_create_engine")
private Boolean allowCreateEngine;
@JsonProperty("allow_sampling")
private Boolean allowSampling;
@JsonProperty("allow_logprobs")
private Boolean allowLogprobs;
@JsonProperty("allow_search_indices")
private Boolean allowSearchIndices;
@JsonProperty("allow_view")
private Boolean allowView;
@JsonProperty("allow_fine_tuning")
private Boolean allowFineTuning;
private String organization;
private String group;
@JsonProperty("is_blocking")
private Boolean isBlocking;
}