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

token handling suggestion #53

Open
mting806 opened this issue Dec 29, 2024 · 1 comment
Open

token handling suggestion #53

mting806 opened this issue Dec 29, 2024 · 1 comment

Comments

@mting806
Copy link

hello
maybe could add a env fetching like in route chat

      // Get the token from environment variables if available
      let token = process.env.TOKEN;

      if (!token) {
        // Fall back to the old logic to split and sample token from headers
        const tokens = chat.tokenSplit(request.headers.authorization);
        token = _.sample(tokens);
      }
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

No branches or pull requests

2 participants
@mting806 and others