Skip to content

Make app server module importable#125

Merged
abetlen merged 3 commits intoabetlen:mainfrom
Stonelinks:app-server-module-importable
May 1, 2023
Merged

Make app server module importable#125
abetlen merged 3 commits intoabetlen:mainfrom
Stonelinks:app-server-module-importable

Conversation

@Stonelinks
Copy link
Copy Markdown
Contributor

First of all thanks for the awesome library!

I don't want to spam you with a bunch of stuff from my fork but I'll try and keep changes minimal and submit PRs, feel free to keep or ignore whichever ones you see fit.

This one just makes the fastapi server app importable as a module (see Stonelinks#1 for more details)

@Stonelinks Stonelinks force-pushed the app-server-module-importable branch from 3afe088 to ebab54c Compare April 29, 2023 06:50
@abetlen
Copy link
Copy Markdown
Owner

abetlen commented Apr 29, 2023

@Stonelinks great work, really appreciate it!

I noticed both open PRs have some changes to the pyproject / poetry dependencies, are these necessary? Otherwise I'm good to merge these in once the conflicts are resolved.

Cheers

Define an init_llama function that starts llama with supplied settings instead of just doing it in the global context of app.py

This allows the test to be less brittle by not needing to mess with os.environ, then importing the app
@Stonelinks Stonelinks force-pushed the app-server-module-importable branch from ebab54c to efe8e6f Compare April 29, 2023 18:42
@Stonelinks
Copy link
Copy Markdown
Contributor Author

@abetlen conflicts resolved

and yeah I had to install httpx in order for the server test I added to work, I think specifically the fastapi TestClient needed it.

@abetlen abetlen merged commit 79ba9ed into abetlen:main May 1, 2023
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.

2 participants