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 'entity_id' Parameter #107

Merged
merged 3 commits into from
Dec 18, 2024
Merged

✨ feat: Add 'entity_id' Parameter #107

merged 3 commits into from
Dec 18, 2024

Conversation

danny-avila
Copy link
Owner

@danny-avila danny-avila commented Dec 18, 2024

Summary

I added support for 'entity_id' as an alternative to 'user_id' in various endpoints, improved the handling of the 'DEBUG_RAG_API' environment variable, and updated the VSCode launch settings to include an 'envFile' configuration.

  • Added entity_id as an alternative parameter in the /query, /embed, /embed-upload, and /local/embed endpoints to allow authorization using entity_id for shared resources.
  • Improved debug_mode environment variable handling by ensuring consistent parsing of boolean values, supporting multiple truthy values like 'true', '1', 'yes', etc.
  • Updated exception handling to provide more detailed error responses when request validation fails.
  • Updated VSCode launch.json to include envFile configuration, allowing environment variables to be loaded during debugging sessions.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Testing

I tested the changes by running the API locally and invoking the updated endpoints with and without entity_id and user_id to verify that authorization works correctly. I tested different DEBUG_RAG_API values to ensure the debug mode setting is properly handled. I also ran the application in VSCode to confirm that the envFile configuration loads environment variables as expected.

Test Configuration:

  • OS: Ubuntu 20.04
  • Python Version: 3.9
  • Environment: Variables set in .env file during testing

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.

@danny-avila danny-avila changed the title ✨ feat: Add 'entity_id' Parameter and Improve Configuration Handling ✨ feat: Add 'entity_id' Parameter Dec 18, 2024
@danny-avila danny-avila merged commit 9e4bb52 into main Dec 18, 2024
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.

1 participant