Skip to content

feat: add user resource and documentation for retrieving authenticated user info#108

Merged
adubovik merged 6 commits into
epam:developmentfrom
kryachkow:feat/93-user-info
Jun 25, 2026
Merged

feat: add user resource and documentation for retrieving authenticated user info#108
adubovik merged 6 commits into
epam:developmentfrom
kryachkow:feat/93-user-info

Conversation

@kryachkow

@kryachkow kryachkow commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Applicable issues

Fixes #93

Description of changes

Summary

Add support for the DIAL /v1/user/info endpoint in the Python SDK by introducing a new user resource with sync/async info() methods. This lets services (for example StatGPT backend) fetch authenticated user info via aidial-client instead of custom direct HTTP calls.

Changes

  • Added User and AsyncUser resources with info() -> GET /v1/user/info
  • Wired user into Dial and AsyncDial
  • Exported the new resources in aidial_client/resources/__init__.py
  • Added tests for sync/async success, request method+URL, and HTTP error handling
  • Updated README.md with usage examples:
    • client.user.info()
    • await async_client.user.info()

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kryachkow kryachkow requested a review from adubovik as a code owner June 10, 2026 11:26
Comment thread aidial_client/resources/user.py Outdated
Comment thread README.md Outdated
adubovik and others added 3 commits June 22, 2026 18:12
…UserInfo objects

- Added UserInfo class to represent authenticated user information.
- Updated info methods in User and AsyncUser classes to return UserInfo instead of dict.
- Enhanced README with examples of UserInfo object structure for API key and access token authentication.
- Updated tests to validate UserInfo structure and claims handling.
@adubovik adubovik enabled auto-merge (squash) June 25, 2026 10:21
@adubovik adubovik merged commit ce3506c into epam:development Jun 25, 2026
9 checks passed
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.

Add support for the user info endpoint

2 participants