GithubHelp home page GithubHelp logo

Comments (3)

manvkaur avatar manvkaur commented on June 15, 2024

Verified the assistant working with following model versions:

  • 0613
  • 1106 (it has duplicate calls issue #36 )

Doesn't work with

  • 0301

from azure-functions-openai-extension.

manvkaur avatar manvkaur commented on June 15, 2024

The issue is reproducible directly with console app of Azure OpenAI samples, linked issue - Azure/azure-sdk-for-net#43964

from azure-functions-openai-extension.

manvkaur avatar manvkaur commented on June 15, 2024

This is an unfortunate artifact of model version naming and GA defaulting scheme; per the AOAI models documentation, -0301 is the oldest model version still available and will be retired no later than August 1st.

That version of the model is older than either tool or function calling features, which is why these odd invocation messages show up in the text.
To get things working, please update to a newer version: -0125 is the latest, and either -0613 or -1106 also support tool-calling functionality well (parallel tool calling first became available with 1106)

To demonstrate the delta in an SDK-independent way, here are a couple of contrasting service requests using curl:

curl
-l ${AOAI_ENDPOINT}/openai/deployments/gpt-35-turbo-0301/chat/completions?api-version=2024-04-01-preview
-H "Content-Type: application/json"
-H "api-key: $AOAI_API_KEY"
-d '{
"messages": [
{ "role": "system", "content": "call provided function tools when needed" },
{ "role": "user", "content": "what is my favorite color?" }
],
"tools": [{
"type": "function",
"function": { "name": "get_favorite_color", "description": "gets the favorite color of the user" }
}]
}'

{"choices":[…,"finish_reason":"stop",…,"message":{"content":"I'm sorry, but as an AI language model, I don't have access to personal information such as your favorite color. Maybe you can tell me what it is?","role":"assistant"}}],…}

Versus:

curl
-l ${AOAI_ENDPOINT}/openai/deployments/gpt-35-turbo-0613/chat/completions?api-version=2024-04-01-preview
-H "Content-Type: application/json"
-H "api-key: $AOAI_API_KEY"
-d '{
"messages": [
{ "role": "system", "content": "call provided function tools when needed" },
{ "role": "user", "content": "what is my favorite color?" }
],
"tools": [{
"type": "function",
"function": { "name": "get_favorite_color", "description": "gets the favorite color of the user" }
}]
}'

{"choices":[…,"finish_reason":"tool_calls",…,"message":{"content":null,"role":"assistant","tool_calls":[{"function":{"arguments":"{}","name":"get_favorite_color"},"id":"call_6mQPoeZbmpUnJfEwofFznfBb","type":"function"}]}}],…}

from azure-functions-openai-extension.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.