Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code to use openai_base_url and use OpenAI's model lister function #189

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

zestysoft
Copy link
Contributor

I had some trouble running fabric locally due to some hard coded openai urls in the fetch_available_models functions which required having a valid OPENAI_API_KEY.

This should let fabric communicate with other open_api compliant servers.

I also threw in replacement code to use the model listing function that's included with the OpenAI class.

Finally I've added some detail to the error messages if an exception is thrown while retrieving the list of models.

@xssdoctor xssdoctor merged commit 2f89748 into danielmiessler:main Mar 12, 2024
@meirm
Copy link
Contributor

meirm commented Mar 12, 2024

This commit generates an error:
fabric --setup
Traceback (most recent call last):
File "/Users/meirm/Library/Caches/pypoetry/virtualenvs/fabric-M01m3Wmw-py3.11/bin/fabric", line 3, in
from installer import cli
File "/Users/meirm/git/github/fabric/installer/init.py", line 1, in
from .client.cli import main as cli
File "/Users/meirm/git/github/fabric/installer/client/cli/init.py", line 1, in
from .fabric import main
File "/Users/meirm/git/github/fabric/installer/client/cli/fabric.py", line 1, in
from .utils import Standalone, Update, Setup, Alias
File "/Users/meirm/git/github/fabric/installer/client/cli/utils.py", line 273
print(f'{e.message} trying to access {e.request.url}: {getattr(e.cause, 'args', [''])}')

@zestysoft
Copy link
Contributor Author

This commit generates an error:

I see the traceback, but not the error?

@meirm
Copy link
Contributor

meirm commented Mar 12, 2024 via email

@zestysoft
Copy link
Contributor Author

Looks like this PR got clobbered here
73c505c

I'll re-submit and apply that fix, ty!

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.

3 participants