Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix input message attribute issues + toolcalling from dogfooding #948

Merged
merged 7 commits into from
Aug 28, 2024

Conversation

21ShisodeParth
Copy link
Contributor

No description provided.

@21ShisodeParth 21ShisodeParth requested a review from a team as a code owner August 22, 2024 23:35
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 22, 2024
Copy link
Contributor

@axiomofjoy axiomofjoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add sync and async tests for incorporating back in tool call results in subsequent calls to the API? This is a good starting place.

@axiomofjoy
Copy link
Contributor

axiomofjoy commented Aug 23, 2024

Looks like we have the correct information showing in the UI 👍

Screenshot 2024-08-22 at 11 54 10 PM

[


    {
        "role": "user",
        "content": "What is the weather like in San Francisco in Fahrenheit?"
    },
    {
        "content": [
            {
                "text": "Certainly! I can help you get the current weather information for San Francisco in Fahrenheit. To do this, I'll use the `get_weather` function. Let me fetch that information for you right away.",
                "type": "text"
            },
            {
                "id": "toolu_01Frt3tu9xCxmPXJ1qtigiae",
                "input": {
                    "location": "San Francisco, CA",
                    "unit": "fahrenheit"
                },
                "name": "get_weather",
                "type": "tool_use"
            }
        ],
        "role": "assistant"
    },
    {
        "content": [
            {
                "tool_use_id": "toolu_01Frt3tu9xCxmPXJ1qtigiae",
                "content": "{\"weather\": \"sunny\", \"temperature\": \"75\"}",
                "type": "tool_result",
                "is_error": false
            }
        ],
        "role": "user"
    }
]

@axiomofjoy
Copy link
Contributor

Nice job getting this one right:

  {
    "message": {
      "content": "Certainly! I can help you get the current weather information for San Francisco in Fahrenheit. To do this, I'll use the `get_weather` function. Let me fetch that information for you right away.",
      "tool_calls": [
        {
          "tool_call": {
            "function": {
              "arguments": "{\"location\": \"San Francisco, CA\", \"unit\": \"fahrenheit\"}",
              "name": "get_weather"
            }
          }
        }
      ],
      "role": "assistant"
    }
  },

It's cool that that shows up correctly in the UI, because I don't think OpenAI does the same thing where it sends content and tool calls in the same message. Can we do this same thing in the output messages?

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Aug 24, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 24, 2024
@21ShisodeParth 21ShisodeParth changed the title chore: Fix input message attribute issues + toolcalling from dogfooding fix: Fix input message attribute issues + toolcalling from dogfooding Aug 27, 2024
@Arize-ai Arize-ai deleted a comment from vercel bot Aug 27, 2024
Copy link

vercel bot commented Aug 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
phoenix-vercel ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 28, 2024 0:19am

@21ShisodeParth 21ShisodeParth merged commit dde31f5 into main Aug 28, 2024
5 checks passed
@21ShisodeParth 21ShisodeParth deleted the parth/dogfooding branch August 28, 2024 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants