Features

Function Calling

LLM Function Calling

OpenAI, at its core, is a powerhouse of innovation and transformative technologies that is reshaping the landscape of artificial intelligence and large language model. In this article, what we will cover include:

  • OpenAI function calling.

  • Benefits of OpenAI functions.

  • How to use OpenAI function in Orquesta.

  • Some important use cases.

OpenAI function calling

OpenAI's function calling capability enables GPT models to generate structured JSON output, resolving common developer issues caused by irregular outputs. OpenAI is very good in generating response in a systematic way, you can perform prompt management to optimize your model output to avoid hallucinations.

OpenAI function calling was developed to allow developers to more easily and reliably use GPT-3 and GPT-4 to generate structured output. Before function calling was available, developers had to use regular expressions (RegEx) or prompt engineering to extract the information from the text string that the model generated. This was often difficult and time-consuming, and it could lead to errors.

Function calling allows developers to define their own functions and pass them to the model as input. The model will then generate output that adheres to the function signature. This makes it much easier for developers to get the structured output that they need.

Benefits of OpenAI functions

There are many benefits to using OpenAI functions, here are a few of the most important ones:

  • Increased flexibility: OpenAI functions allow developers to create more complex and sophisticated applications that require structured output. This is because developers can define their own functions and pass them to the model as input. This gives developers more control over the output that the model generates.

  • Improved reliability: OpenAI functions can help to improve the reliability of generating structured output from GPT-3 and GPT-4. This is because the model is able to generate output that adheres to the function signature. This makes it easier for developers to extract the information that they need from the output.

  • Reduced development time: OpenAI functions can help to reduce the development time for applications that use GPT-3 and GPT-4. This is because developers do not need to spend time engineering prompts or using regular expressions to extract information from the output.

  • Improved user experience: OpenAI functions can help to improve the user experience of applications that use GPT-3 and GPT-4. This is because the model is able to generate output that is more structured and easier to understand.

How to use OpenAI function in Orquesta

Orquesta allows you to make use of the OpenAI function calling, since the platform supports OpenAI models, there are currently a few models that supports OpenAI functions. You can find the OpenAI model that supports OpenAI functions in the model garden having the fx icon.

Functions consume more tokens and this is why most teams don't use it in their prompts. You can temporarily disable a function or permanently disable a function to save your tokens.

For example:

You can go ahead to create the prompt, for this example you will get the exact weather report for a particular City / Country.

From the screenshot above, two variables were passed into the prompt β€œcityβ€œ and β€œcountryβ€œ. And the model selected is the openai/gpt-4-32k-0613 which supports OpenAI function calling.

The next thing is to create a function on the left sidebar, a function can be created using the + icon. The get_current_weather function is created for the purpose of this tutorial. You can now set the format Celsius or Fahrenheit in the input box. The location is set to San Francisco, CA which is the variable city and country.

One more thing to note is that you can set a function to be required or optional, by clicking on the * icon (which turns red immediately) you can set the function to required.

On the sidebar, you can also create a new function, edit/rename the first function. This function will be used to get the number of days of the weather forecast. Set the format, the location and the number of days which is represented with the name num_days, you can pass the number of you want to it and the prompt will generate a response showing the weather forecast in Celsius or Fahrenheit for San Francisco, CA, and the number of days specified.

Use cases

Here are some use cases for you to consider:

  • Generating creative text formats: You can use these functions to generate different creative text formats, such as poems, code, scripts, musical pieces, email, letters, etc. This can be useful for a variety of tasks, such as generating marketing copy, writing blog posts, or creating scripts for videos.

  • Translating languages: OpenAI functions can also be used to translate languages. This can be useful for businesses that operate internationally, or for individuals who want to translate text from one language to another.

  • Classifying and summarizing text: When working with texts you may want to classify and summarize it. OpenAI functions can be useful for tasks such as organizing data, creating content libraries, and generating reports.

  • Answering questions in a comprehensive and informative way: OpenAI functions can be used to answer questions in a comprehensive and informative way. This can be useful for creating chatbots, developing educational tools, and providing customer support.


Get started today.

Learn how to integrate Orquesta with OpenAI using Python SDK: https://orquesta.cloud/blog/llm-ops-integrate-orquesta-openai-python

Check out Orquesta documentation.

Follow us on Twitter, LinkedIn and GitHub.

LLM Function Calling

OpenAI, at its core, is a powerhouse of innovation and transformative technologies that is reshaping the landscape of artificial intelligence and large language model. In this article, what we will cover include:

  • OpenAI function calling.

  • Benefits of OpenAI functions.

  • How to use OpenAI function in Orquesta.

  • Some important use cases.

OpenAI function calling

OpenAI's function calling capability enables GPT models to generate structured JSON output, resolving common developer issues caused by irregular outputs. OpenAI is very good in generating response in a systematic way, you can perform prompt management to optimize your model output to avoid hallucinations.

OpenAI function calling was developed to allow developers to more easily and reliably use GPT-3 and GPT-4 to generate structured output. Before function calling was available, developers had to use regular expressions (RegEx) or prompt engineering to extract the information from the text string that the model generated. This was often difficult and time-consuming, and it could lead to errors.

Function calling allows developers to define their own functions and pass them to the model as input. The model will then generate output that adheres to the function signature. This makes it much easier for developers to get the structured output that they need.

Benefits of OpenAI functions

There are many benefits to using OpenAI functions, here are a few of the most important ones:

  • Increased flexibility: OpenAI functions allow developers to create more complex and sophisticated applications that require structured output. This is because developers can define their own functions and pass them to the model as input. This gives developers more control over the output that the model generates.

  • Improved reliability: OpenAI functions can help to improve the reliability of generating structured output from GPT-3 and GPT-4. This is because the model is able to generate output that adheres to the function signature. This makes it easier for developers to extract the information that they need from the output.

  • Reduced development time: OpenAI functions can help to reduce the development time for applications that use GPT-3 and GPT-4. This is because developers do not need to spend time engineering prompts or using regular expressions to extract information from the output.

  • Improved user experience: OpenAI functions can help to improve the user experience of applications that use GPT-3 and GPT-4. This is because the model is able to generate output that is more structured and easier to understand.

How to use OpenAI function in Orquesta

Orquesta allows you to make use of the OpenAI function calling, since the platform supports OpenAI models, there are currently a few models that supports OpenAI functions. You can find the OpenAI model that supports OpenAI functions in the model garden having the fx icon.

Functions consume more tokens and this is why most teams don't use it in their prompts. You can temporarily disable a function or permanently disable a function to save your tokens.

For example:

You can go ahead to create the prompt, for this example you will get the exact weather report for a particular City / Country.

From the screenshot above, two variables were passed into the prompt β€œcityβ€œ and β€œcountryβ€œ. And the model selected is the openai/gpt-4-32k-0613 which supports OpenAI function calling.

The next thing is to create a function on the left sidebar, a function can be created using the + icon. The get_current_weather function is created for the purpose of this tutorial. You can now set the format Celsius or Fahrenheit in the input box. The location is set to San Francisco, CA which is the variable city and country.

One more thing to note is that you can set a function to be required or optional, by clicking on the * icon (which turns red immediately) you can set the function to required.

On the sidebar, you can also create a new function, edit/rename the first function. This function will be used to get the number of days of the weather forecast. Set the format, the location and the number of days which is represented with the name num_days, you can pass the number of you want to it and the prompt will generate a response showing the weather forecast in Celsius or Fahrenheit for San Francisco, CA, and the number of days specified.

Use cases

Here are some use cases for you to consider:

  • Generating creative text formats: You can use these functions to generate different creative text formats, such as poems, code, scripts, musical pieces, email, letters, etc. This can be useful for a variety of tasks, such as generating marketing copy, writing blog posts, or creating scripts for videos.

  • Translating languages: OpenAI functions can also be used to translate languages. This can be useful for businesses that operate internationally, or for individuals who want to translate text from one language to another.

  • Classifying and summarizing text: When working with texts you may want to classify and summarize it. OpenAI functions can be useful for tasks such as organizing data, creating content libraries, and generating reports.

  • Answering questions in a comprehensive and informative way: OpenAI functions can be used to answer questions in a comprehensive and informative way. This can be useful for creating chatbots, developing educational tools, and providing customer support.


Get started today.

Learn how to integrate Orquesta with OpenAI using Python SDK: https://orquesta.cloud/blog/llm-ops-integrate-orquesta-openai-python

Check out Orquesta documentation.

Follow us on Twitter, LinkedIn and GitHub.

LLM Function Calling

OpenAI, at its core, is a powerhouse of innovation and transformative technologies that is reshaping the landscape of artificial intelligence and large language model. In this article, what we will cover include:

  • OpenAI function calling.

  • Benefits of OpenAI functions.

  • How to use OpenAI function in Orquesta.

  • Some important use cases.

OpenAI function calling

OpenAI's function calling capability enables GPT models to generate structured JSON output, resolving common developer issues caused by irregular outputs. OpenAI is very good in generating response in a systematic way, you can perform prompt management to optimize your model output to avoid hallucinations.

OpenAI function calling was developed to allow developers to more easily and reliably use GPT-3 and GPT-4 to generate structured output. Before function calling was available, developers had to use regular expressions (RegEx) or prompt engineering to extract the information from the text string that the model generated. This was often difficult and time-consuming, and it could lead to errors.

Function calling allows developers to define their own functions and pass them to the model as input. The model will then generate output that adheres to the function signature. This makes it much easier for developers to get the structured output that they need.

Benefits of OpenAI functions

There are many benefits to using OpenAI functions, here are a few of the most important ones:

  • Increased flexibility: OpenAI functions allow developers to create more complex and sophisticated applications that require structured output. This is because developers can define their own functions and pass them to the model as input. This gives developers more control over the output that the model generates.

  • Improved reliability: OpenAI functions can help to improve the reliability of generating structured output from GPT-3 and GPT-4. This is because the model is able to generate output that adheres to the function signature. This makes it easier for developers to extract the information that they need from the output.

  • Reduced development time: OpenAI functions can help to reduce the development time for applications that use GPT-3 and GPT-4. This is because developers do not need to spend time engineering prompts or using regular expressions to extract information from the output.

  • Improved user experience: OpenAI functions can help to improve the user experience of applications that use GPT-3 and GPT-4. This is because the model is able to generate output that is more structured and easier to understand.

How to use OpenAI function in Orquesta

Orquesta allows you to make use of the OpenAI function calling, since the platform supports OpenAI models, there are currently a few models that supports OpenAI functions. You can find the OpenAI model that supports OpenAI functions in the model garden having the fx icon.

Functions consume more tokens and this is why most teams don't use it in their prompts. You can temporarily disable a function or permanently disable a function to save your tokens.

For example:

You can go ahead to create the prompt, for this example you will get the exact weather report for a particular City / Country.

From the screenshot above, two variables were passed into the prompt β€œcityβ€œ and β€œcountryβ€œ. And the model selected is the openai/gpt-4-32k-0613 which supports OpenAI function calling.

The next thing is to create a function on the left sidebar, a function can be created using the + icon. The get_current_weather function is created for the purpose of this tutorial. You can now set the format Celsius or Fahrenheit in the input box. The location is set to San Francisco, CA which is the variable city and country.

One more thing to note is that you can set a function to be required or optional, by clicking on the * icon (which turns red immediately) you can set the function to required.

On the sidebar, you can also create a new function, edit/rename the first function. This function will be used to get the number of days of the weather forecast. Set the format, the location and the number of days which is represented with the name num_days, you can pass the number of you want to it and the prompt will generate a response showing the weather forecast in Celsius or Fahrenheit for San Francisco, CA, and the number of days specified.

Use cases

Here are some use cases for you to consider:

  • Generating creative text formats: You can use these functions to generate different creative text formats, such as poems, code, scripts, musical pieces, email, letters, etc. This can be useful for a variety of tasks, such as generating marketing copy, writing blog posts, or creating scripts for videos.

  • Translating languages: OpenAI functions can also be used to translate languages. This can be useful for businesses that operate internationally, or for individuals who want to translate text from one language to another.

  • Classifying and summarizing text: When working with texts you may want to classify and summarize it. OpenAI functions can be useful for tasks such as organizing data, creating content libraries, and generating reports.

  • Answering questions in a comprehensive and informative way: OpenAI functions can be used to answer questions in a comprehensive and informative way. This can be useful for creating chatbots, developing educational tools, and providing customer support.


Get started today.

Learn how to integrate Orquesta with OpenAI using Python SDK: https://orquesta.cloud/blog/llm-ops-integrate-orquesta-openai-python

Check out Orquesta documentation.

Follow us on Twitter, LinkedIn and GitHub.

Start powering your SaaS with LLMs

Start

powering

your SaaS

with LLMs

Start powering your SaaS with LLMs