-
Notifications
You must be signed in to change notification settings - Fork 4
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
prompt and embedding function base on http_client #9
Comments
Thanks @alitrack for the fantastic usage example! We might use this in the wiki/readme. A similar function is offered with the open_prompt extension helper - do you see any missing feature there? |
sounds great, I will try it. |
@alitrack I really like your article, please feel free to PR any example to the README 👍 or in the |
@lmangani @alitrack I tried using this example, and got the response below; curious if https is working correctly for you in this instance? { "status": 403, "reason": "Forbidden", "body": "{\n \"error\": {\n \"type\": \"invalid_request_error\",\n \"code\": \"http_unsupported\",\n \"message\": \"The OpenAI API is only accessible over HTTPS. Ensure the URL starts with 'https://' and not 'http://'.\",\n \"param\": null\n }\n}" } |
@falling-springs Make sure you're using the latest version of the extension for DuckDB v1.1.3 as this was reported as fix by other users. |
Interesting; I am seeing this error with duckdb version 1.1.3 and http_client extension version "d3a3dee" (which is the latest available via the community source, as far as I can tell, based on using the UPDATE EXTENSIONS statement); I am using duckdb via the python client / on macOS Sequoia 15.1 / on an M3 chip, if relevant. |
@lmangani I'm not that familiar w/ the C API, but it looks like the SetupHttpClient function is just passing the domain (I.e. "api.openai.com") rather than the scheme + domain ("https://api.openai.com") when creating the client, which I think might default to http unless you explicitly use the SSLClient class? That's based on my quick skim of the readme at cpp-httlib Happy to make a new issue / PR if helpful to you?
EDIT: Confirmed this worked as expected for me when I modified the extension to pass scheme + domain:
|
Thanks for the PR @falling-springs is the latest release working as expected? |
prompt
embedding
for Chinese details, please visit
https://mp.weixin.qq.com/s?__biz=MzU1NTg2ODQ5Nw==&mid=2247490026&idx=1&sn=6c619eb49cf4e770fc84e60b37666d25&chksm=fbcc91d4ccbb18c2a3e4e1945caff20bdae2a2e3da16a28afcb72165228c2354aa4a6b6b6c3d&token=499112804&lang=zh_CN#rd
The text was updated successfully, but these errors were encountered: