@@ -60,10 +60,10 @@ def __init__(
6060 )
6161 self .base_url = base_url
6262
63- def _get_headers (
63+ def get_headers (
6464 self , additional_headers : Optional [Dict [str , str ]] = None
6565 ) -> Dict [str , str ]:
66- """Build headers including authentication."""
66+ """Build headers including authentication and user agent ."""
6767 headers = {
6868 "Authorization" : f"Bearer { self .api_key } " ,
6969 "User-Agent" : f"fish-audio/python/{ __version__ } " ,
@@ -77,7 +77,7 @@ def _prepare_request_kwargs(
7777 ) -> None :
7878 """Prepare request kwargs by merging headers, timeout, and query params."""
7979 # Merge headers
80- headers = self ._get_headers ()
80+ headers = self .get_headers ()
8181 if request_options and request_options .additional_headers :
8282 headers .update (request_options .additional_headers )
8383 kwargs ["headers" ] = {** headers , ** kwargs .get ("headers" , {})}
@@ -113,7 +113,7 @@ def __init__(
113113 self ._client = httpx .Client (
114114 base_url = base_url ,
115115 timeout = httpx .Timeout (timeout ),
116- headers = self ._get_headers (),
116+ headers = self .get_headers (),
117117 )
118118
119119 def request (
@@ -185,7 +185,7 @@ def __init__(
185185 self ._client = httpx .AsyncClient (
186186 base_url = base_url ,
187187 timeout = httpx .Timeout (timeout ),
188- headers = self ._get_headers (),
188+ headers = self .get_headers (),
189189 )
190190
191191 async def request (
0 commit comments