yocto-gl
yocto-gl copied to clipboard
[FR] Support function calling for openai in gateway
Willingness to contribute
No. I cannot contribute this feature at this time.
Proposal Summary
I am new to MLflow, so please let me know if this feature actually exists. I did spend some time exploring the docs and code to see if I can use the function calling like the following in openai API with MLflow gateway (note the attribute functions
and function_call
). However, I did not find this feature so far. It seems currently we do not support it. Considering the usefulness of this feature, it may be beneficial for MLflow to support the two inputs functions
and function_call
.
The below is copied from https://platform.openai.com/docs/guides/gpt/function-calling
def run_conversation():
# Step 1: send the conversation and available functions to GPT
messages = [{"role": "user", "content": "What's the weather like in Boston?"}]
functions = [
{
"name": "get_current_weather",
"description": "Get the current weather in a given location",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "The city and state, e.g. San Francisco, CA",
},
"unit": {"type": "string", "enum": ["celsius", "fahrenheit"]},
},
"required": ["location"],
},
}
]
response = openai.ChatCompletion.create(
model="gpt-3.5-turbo-0613",
messages=messages,
functions=functions,
function_call="auto", # auto is default, but we'll be explicit
)
response_message = response["choices"][0]["message"]
Motivation
What is the use case for this feature?
people who uses LLM may need this feature for their application development with MLflow
Why is this use case valuable to support for MLflow users in general?
Why is this use case valuable to support for your project(s) or organization?
Why is it currently difficult to achieve this use case?
Details
No response
What component(s) does this bug affect?
- [ ]
area/artifacts
: Artifact stores and artifact logging - [ ]
area/build
: Build and test infrastructure for MLflow - [ ]
area/docs
: MLflow documentation pages - [ ]
area/examples
: Example code - [ ]
area/gateway
: AI Gateway service, Gateway client APIs, third-party Gateway integrations - [ ]
area/model-registry
: Model Registry service, APIs, and the fluent client calls for Model Registry - [ ]
area/models
: MLmodel format, model serialization/deserialization, flavors - [ ]
area/recipes
: Recipes, Recipe APIs, Recipe configs, Recipe Templates - [ ]
area/projects
: MLproject format, project running backends - [ ]
area/scoring
: MLflow Model server, model deployment tools, Spark UDFs - [ ]
area/server-infra
: MLflow Tracking server backend - [ ]
area/tracking
: Tracking Service, tracking client APIs, autologging
What interface(s) does this bug affect?
- [ ]
area/uiux
: Front-end, user experience, plotting, JavaScript, JavaScript dev server - [ ]
area/docker
: Docker use across MLflow's components, such as MLflow Projects and MLflow Models - [ ]
area/sqlalchemy
: Use of SQLAlchemy in the Tracking Service or Model Registry - [ ]
area/windows
: Windows support
What language(s) does this bug affect?
- [ ]
language/r
: R APIs and clients - [ ]
language/java
: Java APIs and clients - [ ]
language/new
: Proposals for new client languages
What integration(s) does this bug affect?
- [ ]
integrations/azure
: Azure and Azure ML integrations - [ ]
integrations/sagemaker
: SageMaker integrations - [ ]
integrations/databricks
: Databricks integrations
@XinEDprob Thanks for the FR. This feature doesn't exist yet.
@mlflow/mlflow-team Please assign a maintainer and start triaging this issue.
Hi @harupy, I would like to use this feature as well. If no one has been assigned yet, can I work on this instead?
@XinEDprob Thanks for the FR. This feature doesn't exist yet.
thanks for letting me know!
It would be great to have this Feature.
This is a very important feature, without it, having scalable agents would be very difficulty, who would be the hero to see this and implement it!