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

feat: add first web API REST endpoints (alpha) #171

Merged
merged 6 commits into from
Dec 3, 2023

Conversation

janaka
Copy link
Contributor

@janaka janaka commented Dec 3, 2023

Description

  • Add REST API framework implementation into Streamlit

    • Uses a hack to get a reference to the Tornado web server instance to add routes + handlers.
    • Has token-based auth hooks wired up. Token gen and checking need to be implemented.
  • Add endpoints:

    • /api/chat/completion - direct LLM calls
    • /api/rag/completion - RAG based on spaces

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactor and code improvement (non-breaking change which improves code quality and/or performance)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation
  • Tests
  • Other chores such as maintenance

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration by modifying the list below.

  • Test A
  • Test B
  • Test C

Test Configuration:

Please describe the test setup. List them below as bullet points.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • The commit message follows the convention of this project

@janaka janaka marked this pull request as ready for review December 3, 2023 14:23
@janaka janaka requested a review from a team as a code owner December 3, 2023 14:23
@janaka janaka merged commit 1eb9b3e into main Dec 3, 2023
1 check passed
@janaka janaka deleted the core/add-first-rest-endpoints branch December 3, 2023 14:50
@janaka janaka linked an issue Feb 12, 2024 that may be closed by this pull request
@janaka janaka linked an issue Feb 24, 2024 that may be closed by this pull request
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.

EXP: try adding a REST API end point to the app RFC: Offering API-based external integrations
1 participant