landgraf-dev / openai-delphi Goto Github PK
View Code? Open in Web Editor NEWOpenAI API client for Delphi and Lazarus/FPC. Use ChatGPT, DALL-E and other products from Pascal language.
License: MIT License
OpenAI API client for Delphi and Lazarus/FPC. Use ChatGPT, DALL-E and other products from Pascal language.
License: MIT License
Thanks again for the nice library Wagner!
One question:
Config.AccessToken is the APIKEY
What about the Organization name? setting in OpenAI API?
I cannot find the property or token field to set.
Thanks!
I'm using Lazarus
response from OpenAi
[Content]
Request failed
status: 401
Response: {
"error": {
"message": "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
api key provided using these :
Client := TOpenAIClient.Create;
Client.Config.AccessToken := GetEnvironmentVariable(apikey);
please add "gpt-3.5-turbo" support which was introduced few days ago.
OpenAiClient.pas
// Request := CreateRequest('/fine-tunes', 'GET');
Request := CreateRequest('/fine_tuning/jobs', 'GET');
//Request := CreateRequest('/fine-tunes/{fine_tune_id}/cancel', 'POST');
Request := CreateRequest('/fine_tuning/jobs/{fine_tuning_job_id}/cancel', 'POST');
Essas foram as duas necessidades que tive e notei que mudaram, porem não testei as demais, estou dando uma olhada para
ver se encontro algo mais e volto a reportar.
Queria se possivel que montasse um demo :
1 - como enviar audios e obter a resposta.
2 - Como fazer treinamentos via Fine tunning e como usar o modelo treinado, pois quando cria m fine tunning ele cria other models, queria saber como usar esse other model treinado com base nas regras enviadas para esse novo modelo.
4 - como enviar imagens
parabens por ter compartilhado esse fonte, me ajudou e com certeza ajudou muitos.
How to get total/unused balance from OpenAI?.. any example ?
I have it working well, thank you for putting this together. I am trying to put together a series of questions that are linked to a single topic or set of data. It seems like each question is separate. Is there a way to continue with a conversation? This is how it works when using web chat. Then, let's say I also want to do the 'new chat' to clear it's memory, is there a way to do that?
Thanks.
To test, something really simple
I have three friends, moe, larry, and curly.
i have a wife named Mary
Who are my three friends?
Hello,
thank you for great work!
My contribution is a demo to use Gpt4All. This is a LLM that can be installed locally as a server: https://github.com/nomic-ai/gpt4all
I have modified a bit two units to compile under Delphi XE2: OpenApiJson.pas, OpenApiIndy.pas. Also added a conditional symbol INDY in OpenApiRest.pas to switch from System.Net to Indy.
Attached all files.
Absolutely incredible code! Would it be possible to add another demo that shows how to do the streaming? i.e. made text appear in "chunks" like done on ChatGPT website?
Thank you for sharing this code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.