Skip to content

Commit

Permalink
Update haystack_experimental/components/tools/openapi/types.py
Browse files Browse the repository at this point in the history
Co-authored-by: Madeesh Kannan <[email protected]>
  • Loading branch information
vblagoje and shadeMe authored Jul 22, 2024
1 parent 722120b commit f0f2079
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haystack_experimental/components/tools/openapi/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def sanitize_function_name(name: str) -> str:
Sanitizes the function name to match the LLM function naming pattern ^[a-zA-Z0-9_-]+$.
:param name: The original function name.
:return: A sanitized function name that matches the allowed pattern.
:returns: A sanitized function name that matches the allowed pattern.
"""
# Replace characters not allowed in the pattern with underscores
sanitized = re.sub(r"[^a-zA-Z0-9_]+", "_", name)
Expand Down

0 comments on commit f0f2079

Please sign in to comment.