Closed jshtok closed 4 months ago
Update: the same code worked when I have provided the credentials using the dotenv. But I would like to keep the auth key as a variable...
BAM Key is the JWT token.
The TOKEN_INVALID
error message indicates that the key you have passed on is not an actual API Key.
API Key should be in the format pak-4...
. You can print the values of your Credentials
instance print(credentials.api_key.get_secret_value())
.
Thank you, Tomáš, I worked it out.
Regards, Josef
On Wed, 24 Apr 2024, 16:33 Tomáš Dvořák, @.***> wrote:
BAM Key is the JWT token.
The TOKEN_INVALID error message indicates that the key you have passed on is not an actual API Key. API Key should be in the format pak-4.... You can print the values of your Credentials instance print(credentials.api_key.get_secret_value()).
— Reply to this email directly, view it on GitHub https://github.com/IBM/ibm-generative-ai/issues/349#issuecomment-2074962385, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACOBU6WKUMLRLFX36MRQRF3Y66YB5AVCNFSM6AAAAABGM7K3Z6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZUHE3DEMZYGU . You are receiving this because you authored the thread.Message ID: @.***>
Version Information
I am trying to run the text generation client. It is initialized with my usual BAM key, credentials = Credentials(api_key=keys[0]) self.client = Client(credentials=credentials)
Then sa I run the generation
I get the error
Is the issue with my BAM key? What is the JWT token?
Thank you!