claude2openai icon indicating copy to clipboard operation
claude2openai copied to clipboard

not support img

Open ywgx opened this issue 1 year ago • 1 comments

curl -i http://127.0.0.1:6600/v1/chat/completions
-H "Content-Type: application/json"
-H "Authorization: Bearer $OPENAI_API_KEY"
-d '{ "model": "claude-3.5-sonnet", "stream_options": { "include_usage": true }, "stream": true, "messages": [ { "role": "user", "content": [ { "type": "text", "text": "What'''s in this image?" }, { "type": "image_url", "image_url": { "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg" } } ] } ], "max_tokens": 300 }'

}

ywgx avatar Aug 08 '24 10:08 ywgx

Yes, this feature is currently not supported in the project, but we may consider adding it in the future. Please stay tuned.

missuo avatar Aug 12 '24 12:08 missuo

I added image support in my fork: https://github.com/dtinth/claude2openai/commit/f5d3d0c445245b9a890d0ae4da46d5d68cd060fb

It’s generated by Claude Code and it works pretty well for me. Feel free to yoink it.

dtinth avatar Mar 10 '25 10:03 dtinth

I added image support in my fork: dtinth@f5d3d0c

It’s generated by Claude Code and it works pretty well for me. Feel free to yoink it.

can you submit a PR? Thx

missuo avatar Mar 10 '25 20:03 missuo

@missuo My branch contains other changes than image support, but anyways I created a PR here in case it is useful.

https://github.com/missuo/claude2openai/pull/10

dtinth avatar Mar 11 '25 03:03 dtinth