strip models/
This commit is contained in:
@@ -42,9 +42,11 @@ const getModelsResponse = () => {
|
||||
const modelIds = Array.from(
|
||||
new Set(keys.map((k) => k.modelIds).flat())
|
||||
).filter((id) => id.startsWith("models/") && !id.includes("bard"));
|
||||
|
||||
|
||||
// Strip "models/" prefix from IDs before creating model objects
|
||||
const models = modelIds.map((id) => ({
|
||||
id,
|
||||
// Strip "models/" prefix from ID for consistency with request processing
|
||||
id: id.startsWith("models/") ? id.slice("models/".length) : id,
|
||||
object: "model",
|
||||
created: new Date().getTime(),
|
||||
owned_by: "google",
|
||||
|
||||
Reference in New Issue
Block a user