Closed hjlarry closed 1 month ago
I found a similar unsolved discussion regarding an "Invalid variable" error, which might be related to your issue. You can check it out here [1].
To resolve the "credential stepfun_base_url should be string" error, ensure that the stepfun_base_url
credential is provided as a string in the credentials dictionary. This error typically occurs when the value of stepfun_base_url
is not a string, which is required by the StepfunTool
during the authorization process.
Here is an example of how you might structure the credentials dictionary to avoid this error:
credentials = {
"stepfun_base_url": "https://example.com/api", # Ensure this is a string
# other credentials
}
# Example usage
try:
StepfunTool().fork_tool_runtime(
runtime={
"credentials": credentials,
}
).invoke(
user_id="",
tool_parameters={
"prompt": "cute girl, blue eyes, white hair, anime style",
"size": "1024x1024",
"n": 1,
},
)
except ToolProviderCredentialValidationError as e:
print(f"Credential validation error: {e}")
Make sure that the stepfun_base_url
is correctly set as a string in the credentials dictionary. The Dify documentation specifies that stepfun_base_url
should be a text input, so ensure it is provided in the correct format [2][3][4][5].
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.8.3
Cloud or Self Hosted
Cloud, Self Hosted (Source)
Steps to reproduce
✔️ Expected Behavior
No response
❌ Actual Behavior