Field limit for OpenAI API key too small

 

Hi all,

I tried to add my own Open AI API key as described here: https://www.metatrader5.com/en/metaeditor/help/development/ai_assistant#settings

However, the field limit seems to be too small for the new project API keys - it cuts them off and then cannot authenticate.

Is there anything I'm missing?

AI Assistant - Developing programs - MetaEditor Help
  • www.metatrader5.com
MetaEditor features AI Assistant — the advanced automatic code completion tool powered by the OpenAI -based models. Write a trading idea in a...
 
Eric Emmrich:

Hi all,

I tried to add my own Open AI API key as described here: https://www.metatrader5.com/en/metaeditor/help/development/ai_assistant#settings

However, the field limit seems to be too small for the new project API keys - it cuts them off and then cannot authenticate.

Is there anything I'm missing?

Which MT5 build do you use?

Make sure the key you are entering follows the exact format expected (sometimes copy-pasting adds extra characters or spaces that cause issues).
 
Oleksandr Medviediev #:

Which MT5 build do you use?

Make sure the key you are entering follows the exact format expected (sometimes copy-pasting adds extra characters or spaces that cause issues).

Version 5.00 build 4410.

Seems like the field only accepts 64 chars.

sk-proj-abLxxgDZ36dTEwn2sxy_hpcP57dLWS1HGr9ENm3stzAhu9lGTOSP1dl <- This is what MT5 accepts (64 chars)
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 <- Original key (meanwhile revoked, of course).

The key was generated from https://platform.openai.com/api-keys, as described in the docs.
 
Eric Emmrich #:

Version 5.00 build 4410.

Seems like the field only accepts 64 chars.

sk-proj-abLxxgDZ36dTEwn2sxy_hpcP57dLWS1HGr9ENm3stzAhu9lGTOSP1dl <- This is what MT5 accepts (64 chars)
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 <- Original key (meanwhile revoked, of course).

The key was generated from https://platform.openai.com/api-keys, as described in the docs.
What is the need for such a lengthy key...
 

https://community.openai.com/t/project-api-key-length-has-it-changed-from-48-to-156/920777

A comment there said :

130 characters including the prefix, which corresponds to around 1000 bits.

Which is plain wrong calculation from characters to bits.

Project API Key Length - has it changed from 48 to 156?
Project API Key Length - has it changed from 48 to 156?
  • 2024.08.24
  • Stawsh
  • community.openai.com
I have been using Project API keys since they were introduced. They have consistently been 48 characters in length, plus the 'sk-proj-" prefix for a total length of 56. But the keys I just generated last week are 156 characters long, or 164 with the 'sk-proj-" prefix. That’s a loooooong key. What’s up? I’ve seen no announcement.
 
Alain Verleyen #:

https://community.openai.com/t/project-api-key-length-has-it-changed-from-48-to-156/920777

A comment there said :

Which is plain wrong calculation from characters to bits.

Ok, so it‘s something recently introduced by OpenAI. How to deal with this?
 
Eric Emmrich #:
Ok, so it‘s something recently introduced by OpenAI. How to deal with this?
Wait for a fix.
 
Alain Verleyen #:
Wait for a fix.
Can I report bugs/issues somewhere? I always wondered about this. 
 
Eric Emmrich #:
Can I report bugs/issues somewhere? I always wondered about this. 
I forwarded it.
 
Alain Verleyen #:
I forwarded it.
Much appreciated - thank you very much, Alain! 

So there‘s no general bug report form or something? I have some other issues with the Linux version of MetaTrader.
 
Eric Emmrich #:
Much appreciated - thank you very much, Alain! 

So there‘s no general bug report form or something? I have some other issues with the Linux version of MetaTrader.

Unfortunately not.

I can report bug through a private channel, but that's all. I can't even guarantee MQ will read it (but they usually did it), and certainly not agree and fix it.