You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While setting up the configuration in the EVI Flutter example, I noticed that the example defaults to connecting with EVI 1. After reviewing the code, I found that the API does not consider the config_id when attempting to connect to EVI.
Current Implementation (Issue):
In main.dart, the code only appends the api_key when no access_token is provided. However, there is no consideration for the config_id, which is essential for connecting to a specific configuration.
Current Code:
var uri = 'wss://api.hume.ai/v0/evi/chat';
if (ConfigManager.instance.humeAccessToken.isNotEmpty) {
uri += '?access_token=${ConfigManager.instance.humeAccessToken}';
} else if (ConfigManager.instance.humeApiKey.isNotEmpty) {
uri += '?api_key=${ConfigManager.instance.humeApiKey}';
} else {
throw Exception('Please set your Hume API credentials in main.dart');
}
Proposed Fix:
To ensure the config_id is included when available, I suggest modifying the code as follows:
var uri = 'wss://api.hume.ai/v0/evi/chat';
if (ConfigManager.instance.humeAccessToken.isNotEmpty) {
uri += '?access_token=${ConfigManager.instance.humeAccessToken}';
} else if (ConfigManager.instance.humeApiKey.isNotEmpty && ConfigManager.instance.humeConfigId.isNotEmpty) {
uri += '?config_id=${ConfigManager.instance.humeConfigId}';
uri += '&api_key=${ConfigManager.instance.humeApiKey}';
} else if (ConfigManager.instance.humeApiKey.isNotEmpty) {
uri += '?api_key=${ConfigManager.instance.humeApiKey}';
} else {
throw Exception('Please set your Hume API credentials in main.dart');
}
Let me know if you need further clarification or if you would like me to create a pull request for this fix.
The text was updated successfully, but these errors were encountered:
Description:
While setting up the configuration in the EVI Flutter example, I noticed that the example defaults to connecting with EVI 1. After reviewing the code, I found that the API does not consider the config_id when attempting to connect to EVI.
Current Implementation (Issue):
In main.dart, the code only appends the api_key when no access_token is provided. However, there is no consideration for the config_id, which is essential for connecting to a specific configuration.
Current Code:
Proposed Fix:
To ensure the config_id is included when available, I suggest modifying the code as follows:
Let me know if you need further clarification or if you would like me to create a pull request for this fix.
The text was updated successfully, but these errors were encountered: