Files

21 lines
573 B
Markdown
Raw Permalink Normal View History

2025-04-23 17:45:47 +08:00
# Models
List and describe the various models available in the API. You can refer to the Models documentation to understand what models are available and the differences between them.
# List models
`get http://192.168.20.186:8000/v1/models`
Lists the currently available models, and provides basic information about each one such as the owner and availability.
```python
from openai import OpenAI
2025-04-23 18:10:08 +08:00
client = OpenAI(
2025-04-23 17:45:47 +08:00
api_key="sk-",
base_url="http://192.168.20.186:8000/v1"
)
client.models.list()
2025-04-23 18:10:08 +08:00
print(client.models.list())
2025-04-23 17:45:47 +08:00
```
## Returns
A list of model objects.