Skip to content

Conversation

benoitf
Copy link
Collaborator

@benoitf benoitf commented Mar 13, 2025

What does this PR do?

inference OCI images may not have Swagger UI, so start the swagger UI in Podman AI Lab and make calls from there to the inference server

Screenshot / video of UI

What issues does this PR fix or reference?

fixes #2695

How to test this PR?

start a new playground for example, then go to the services list, click on "swagger documentation"
you'll notice you're using Swagger UI and you can query the inference server URL from there

so swagger UI is served by AI Lab

unit test added

@benoitf benoitf requested review from jeffmaury and a team as code owners March 13, 2025 11:12
@benoitf benoitf requested review from cdrage and feloy March 13, 2025 11:12
Copy link
Contributor

@feloy feloy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works great, can access the doc and send requests

Copy link
Collaborator

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple remark: if the API server is not started, I think we should not expose a link in the UI at all.

All I would love to see the model name displayed in the Swagger UI rather that the generic "AI Lab Inference Server"

const aiLabPort = this.configurationRegistry.getExtensionConfiguration().apiPort;
// add in the URL the port of the inference server
const aiLabDocsLink = `http://localhost:${aiLabPort}/api-docs/${config.port}`;
console.log('set the ai lab docs link to', aiLabDocsLink);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove ?

@benoitf
Copy link
Collaborator Author

benoitf commented Mar 13, 2025

Simple remark: if the API server is not started, I think we should not expose a link in the UI at all.

in which case the server is not started ?

All I would love to see the model name displayed in the Swagger UI rather that the generic "AI Lab Inference Server"

it could be another path parameter, but I would call it improvement as it's not the case today

Signed-off-by: Florent BENOIT <[email protected]>
@benoitf benoitf enabled auto-merge (squash) March 13, 2025 17:08
@benoitf benoitf merged commit 8de0c18 into containers:main Mar 13, 2025
7 checks passed
axel7083 added a commit to axel7083/ai-studio that referenced this pull request Mar 19, 2025
@axel7083 axel7083 mentioned this pull request Mar 19, 2025
axel7083 added a commit that referenced this pull request Mar 19, 2025
* Revert "feat: make AI lab providing swagger UI for the openAI docs (#2703)"

This reverts commit 8de0c18

Signed-off-by: axel7083 <[email protected]>

* fix: pnpm-lock

Signed-off-by: axel7083 <[email protected]>

---------

Signed-off-by: axel7083 <[email protected]>
mergify bot pushed a commit that referenced this pull request Mar 19, 2025
* Revert "feat: make AI lab providing swagger UI for the openAI docs (#2703)"

This reverts commit 8de0c18

Signed-off-by: axel7083 <[email protected]>

* fix: pnpm-lock

Signed-off-by: axel7083 <[email protected]>

---------

Signed-off-by: axel7083 <[email protected]>
(cherry picked from commit 86db349)
axel7083 added a commit that referenced this pull request Mar 19, 2025
* Revert "feat: make AI lab providing swagger UI for the openAI docs (#2703)"

This reverts commit 8de0c18

Signed-off-by: axel7083 <[email protected]>

* fix: pnpm-lock

Signed-off-by: axel7083 <[email protected]>

---------

Signed-off-by: axel7083 <[email protected]>
(cherry picked from commit 86db349)

Co-authored-by: axel7083 <[email protected]>
benoitf added a commit to benoitf/podman-desktop-extension-ai-lab that referenced this pull request Mar 20, 2025
benoitf added a commit to benoitf/podman-desktop-extension-ai-lab that referenced this pull request Mar 20, 2025
benoitf added a commit to benoitf/podman-desktop-extension-ai-lab that referenced this pull request Mar 20, 2025
benoitf added a commit to benoitf/podman-desktop-extension-ai-lab that referenced this pull request Mar 21, 2025
benoitf added a commit to benoitf/podman-desktop-extension-ai-lab that referenced this pull request Mar 26, 2025
benoitf added a commit that referenced this pull request Mar 26, 2025
…2735)

* feat: make AI lab providing swagger UI for the openAI docs (#2703)

fixes #2695

Signed-off-by: Florent BENOIT <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

move open-ai swaggerUI to AI Lab
3 participants