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

Different AI models seem to have different response types! #824

Open
jelveh opened this issue Nov 1, 2024 · 0 comments
Open

Different AI models seem to have different response types! #824

jelveh opened this issue Nov 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jelveh
Copy link
Contributor

jelveh commented Nov 1, 2024

The AI driver seems to return different responses for different models such claude's, gpt, ... This breaks the consistency expected from the driver.

Claude response:

{
    "success": true,
    "service": {
        "name": "claude"
    },
    "result": {
        "message": {
            "id": "msg_016XXX1pauQjLiu",
            "type": "message",
            "role": "assistant",
            "model": "claude-3-5-sonnet-20240620",
            "content": [
                {
                    "type": "text",
                    "text": "Rick and Morty is an adult animated science fiction ..."
                }
            ],
            "stop_reason": "end_turn",
            "stop_sequence": null,
            "usage": {
                "input_tokens": 84,
                "output_tokens": 767
            }
        },
        "finish_reason": "stop"
    }
}

Same function call but with gpt4o mini:

{
    "success": true,
    "service": {
        "name": "openai-completion"
    },
    "result": {
        "index": 0,
        "message": {
            "role": "assistant",
            "content": "An animated television series created by Justin Roiland and Dan Harmon ...",
            "refusal": null
        },
        "logprobs": null,
        "finish_reason": "stop"
    }
}

Either AI driver or Puter.js should normalize the response. Prefereably the AI driver.

@jelveh jelveh added the bug Something isn't working label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant