@@ -32,7 +32,7 @@ class OpenAIClient(BaseLLMWrapper):
3232 def __init__ (
3333 self ,
3434 * ,
35- model_name : str = "gpt-4o-mini" ,
35+ model : str = "gpt-4o-mini" ,
3636 api_key : Optional [str ] = None ,
3737 base_url : Optional [str ] = None ,
3838 json_mode : bool = False ,
@@ -44,7 +44,7 @@ def __init__(
4444 ** kwargs : Any ,
4545 ):
4646 super ().__init__ (** kwargs )
47- self .model_name = model_name
47+ self .model = model
4848 self .api_key = api_key
4949 self .base_url = base_url
5050 self .json_mode = json_mode
@@ -109,7 +109,7 @@ async def generate_topk_per_token(
109109 kwargs ["max_tokens" ] = 1
110110
111111 completion = await self .client .chat .completions .create ( # pylint: disable=E1125
112- model = self .model_name , ** kwargs
112+ model = self .model , ** kwargs
113113 )
114114
115115 tokens = get_top_response_tokens (completion )
@@ -141,7 +141,7 @@ async def generate_answer(
141141 await self .tpm .wait (estimated_tokens , silent = True )
142142
143143 completion = await self .client .chat .completions .create ( # pylint: disable=E1125
144- model = self .model_name , ** kwargs
144+ model = self .model , ** kwargs
145145 )
146146 if hasattr (completion , "usage" ):
147147 self .token_usage .append (
0 commit comments