mirror of
https://github.com/docling-project/docling-serve.git
synced 2025-11-29 16:43:24 +00:00
feat: version endpoint (#442)
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
import importlib.metadata
|
||||
import inspect
|
||||
import json
|
||||
import platform
|
||||
import re
|
||||
import sys
|
||||
from typing import Union, get_args, get_origin
|
||||
|
||||
from fastapi import Depends, Form
|
||||
from pydantic import BaseModel, TypeAdapter
|
||||
|
||||
DOCLING_VERSIONS = {
|
||||
"docling-serve": importlib.metadata.version("docling-serve"),
|
||||
"docling-jobkit": importlib.metadata.version("docling-jobkit"),
|
||||
"docling": importlib.metadata.version("docling"),
|
||||
"docling-core": importlib.metadata.version("docling-core"),
|
||||
"docling-ibm-models": importlib.metadata.version("docling-ibm-models"),
|
||||
"docling-parse": importlib.metadata.version("docling-parse"),
|
||||
"python": f"{sys.implementation.cache_tag} ({platform.python_version()})",
|
||||
"plaform": platform.platform(),
|
||||
}
|
||||
|
||||
|
||||
def is_pydantic_model(type_):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user