20 lines
707 B
Python
20 lines
707 B
Python
from bfcl_eval.model_handler.api_inference.openai_completion import OpenAICompletionsHandler
|
|
from bfcl_eval.constants.enums import ModelStyle
|
|
from openai import OpenAI
|
|
|
|
|
|
# For setup instructions, please refer to https://github.com/MeetKai/functionary for setup details.
|
|
class FunctionaryHandler(OpenAICompletionsHandler):
|
|
def __init__(
|
|
self,
|
|
model_name,
|
|
temperature,
|
|
registry_name,
|
|
is_fc_model,
|
|
**kwargs,
|
|
) -> None:
|
|
super().__init__(model_name, temperature, registry_name, is_fc_model, **kwargs)
|
|
self.model_style = ModelStyle.OPENAI_COMPLETIONS
|
|
|
|
self.client = OpenAI(base_url="http://localhost:8000/v1", api_key="functionary")
|