@@ -465,20 +465,13 @@ class _GenerativeContextualAIConfig(_GenerativeProvider):
465465 generative : Union [GenerativeSearches , _EnumLikeStr ] = Field (
466466 default = GenerativeSearches .CONTEXTUALAI , frozen = True , exclude = True
467467 )
468- baseURL : Optional [AnyHttpUrl ]
469468 model : Optional [str ]
470469 maxTokensProperty : Optional [int ]
471470 temperatureProperty : Optional [float ]
472471 topPProperty : Optional [float ]
473472 systemPromptProperty : Optional [str ]
474473 avoidCommentaryProperty : Optional [bool ]
475474
476- def _to_dict (self ) -> Dict [str , Any ]:
477- ret_dict = super ()._to_dict ()
478- if self .baseURL is not None :
479- ret_dict ["baseURL" ] = self .baseURL .unicode_string ()
480- return ret_dict
481-
482475
483476class _GenerativeGoogleConfig (_GenerativeProvider ):
484477 generative : Union [GenerativeSearches , _EnumLikeStr ] = Field (
@@ -597,16 +590,9 @@ class _RerankerContextualAIConfig(_RerankerProvider):
597590 default = Rerankers .CONTEXTUALAI , frozen = True , exclude = True
598591 )
599592 model : Optional [Union [RerankerContextualAIModel , str ]] = Field (default = None )
600- baseURL : Optional [AnyHttpUrl ]
601593 instruction : Optional [str ] = Field (default = None )
602594 topN : Optional [int ] = Field (default = None )
603595
604- def _to_dict (self ) -> Dict [str , Any ]:
605- ret_dict = super ()._to_dict ()
606- if self .baseURL is not None :
607- ret_dict ["baseURL" ] = self .baseURL .unicode_string ()
608- return ret_dict
609-
610596
611597class _Generative :
612598 """Use this factory class to create the correct object for the `generative_config` argument in the `collections.create()` method.
@@ -883,7 +869,6 @@ def contextualai(
883869 top_p : Optional [float ] = None ,
884870 system_prompt : Optional [str ] = None ,
885871 avoid_commentary : Optional [bool ] = None ,
886- base_url : Optional [AnyHttpUrl ] = None ,
887872 ) -> _GenerativeProvider :
888873 """Create a `_GenerativeContextualAIConfig` object for use when performing AI generation using the `generative-contextualai` module.
889874
@@ -897,10 +882,8 @@ def contextualai(
897882 top_p: Nucleus sampling parameter (0 < x <= 1). Defaults to `None`, which uses the server-defined default
898883 system_prompt: System instructions the model follows. Defaults to `None`, which uses the server-defined default
899884 avoid_commentary: If `True`, reduce conversational commentary in responses. Defaults to `None`, which uses the server-defined default
900- base_url: The base URL where the API request should go. Defaults to `None`, which uses the server-defined default
901885 """
902886 return _GenerativeContextualAIConfig (
903- baseURL = base_url ,
904887 maxTokensProperty = max_tokens ,
905888 model = model ,
906889 temperatureProperty = temperature ,
@@ -1131,7 +1114,6 @@ def nvidia(
11311114 @staticmethod
11321115 def contextualai (
11331116 model : Optional [str ] = None ,
1134- base_url : Optional [AnyHttpUrl ] = None ,
11351117 instruction : Optional [str ] = None ,
11361118 top_n : Optional [int ] = None ,
11371119 ) -> _RerankerProvider :
@@ -1142,13 +1124,11 @@ def contextualai(
11421124
11431125 Args:
11441126 model: The model to use. Defaults to `None`, which uses the server-defined default
1145- base_url: The base URL to send the reranker requests to. Defaults to `None`, which uses the server-defined default.
11461127 instruction: Custom instructions for reranking. Defaults to `None`.
11471128 top_n: Number of top results to return. Defaults to `None`, which uses the server-defined default.
11481129 """
11491130 return _RerankerContextualAIConfig (
11501131 model = model ,
1151- baseURL = base_url ,
11521132 instruction = instruction ,
11531133 topN = top_n
11541134 )
0 commit comments