Jump to content

Geoffrey Smith

Members
  • Content Count

    28
  • Joined

  • Last visited

  • Days Won

    3

Geoffrey Smith last won the day on November 7 2023

Geoffrey Smith had the most liked content!

Community Reputation

50 Excellent

3 Followers

Technical Information

  • Delphi-Version
    Delphi 12 Athens

Recent Profile Visitors

1957 profile views
  1. Geoffrey Smith

    MCP Server in Delphi

    I've written some code, which is part of my AI demonstration project at https://github.com/geoffsmith82/Symposium2023/ . I currently have a Weather MCP demo. See https://github.com/geoffsmith82/Symposium2023/tree/main/MCP for the demo project code and https://github.com/geoffsmith82/Symposium2023/tree/main/Libs/MCP for the reusable section. I have had it running in Claude desktop. To get the weather you will need to sign up to https://www.weatherapi.com/signup.aspx and get an API Key. Compile and run the TestAPI project and add the API Key via the Settings->API Keys menu item and find "WEATHER_API_KEY" in the list and add in the key there. In the claude_desktop_config.json, it will need to look something like below. Make sure you update the path to were the exe file is actually located. { "mcpServers": { "WeatherMCPService": { "command": "Z:\\Programming\\Symposium2023\\MCP\\WeatherMCPService", "protocol": "stdio", "args": [] } } } Here is what it looks like in claude desktop. Currently working on some other ideas for an MCP, but the code should be enough to get you started.
  2. Geoffrey Smith

    Dllama - Local LLM inference Library

    What happened to this?
  3. Geoffrey Smith

    AI Examples

    I have a project that I originally started for a presentation at the ADUG 2023 Symposium, which was on AI and ChatGPT. Since then I have continued to improve it and added more features to it. One of the goals of this project is to provide a library to Delphi Developers that enables them to easily use various AI models / engines that are currently available. Currently this is mostly done through calling various different REST API's that different companies provide, although another goal is to enable models to be used locally where practical. Features include: - Voice Recognition - Text to Speech - Image Generation - Face Detection - Large Language Models (LLM) like GPT. I have created various example programs that exercise the different API's as well. Today, OpenAI released some new features and API's. I have since added support for Dall-e-3 and the Text to Speech engine so far. To find out more have a look at https://github.com/geoffsmith82/Symposium2023
  4. Geoffrey Smith

    CURL to REST Debugger

    Just an slightly related aside. You can use ChatGPT to convert a curl command to delphi code. It is handy because a lot of REST api documentation may have a curl command for a call, but no Delphi version.
  5. Geoffrey Smith

    WebSockets in Use

    I did my presentation, so you can now find my code at https://github.com/geoffsmith82/Symposium2023
  6. Geoffrey Smith

    WebSockets in Use

    Hi, I know that the WebSockets implementation is brand new and still in the daily branch, so I thought I would give you some feedback that it is working for me. I am using it in a project I am going to be presenting at the ADUG Symposium next week. I am using it to connect to a couple of services that do real-time voice recognition. My talk is actually on AI and ChatGPT, but your WebSockets have allowed me to get the voice recognition functionality working! So thanks. If you want to see my talk and how to get my code follow the link below. https://www.adug.org.au/symposium/2023-symposium-melbourne-and-online/
  7. Geoffrey Smith

    OAuth2 bearer token example?

    As you asked for a few examples... here are a few of my projects that use OAuth2 authentication. They also show the authentication process in the web browser. https://github.com/geoffsmith82/GmailAuthSMTP https://github.com/geoffsmith82/DelphiIntuitAccess
  8. Geoffrey Smith

    Windows 11 Speech Recognition

    I am having a go trying to get speech recognition working in Windows 10. In delphi there is a TSpeechRecognition_SpeechRecognizer class in the Winapi.Media file, but I am only getting a useless error. Unfortunately, I can't seem to find any other Delphi code using this class.
  9. Use this project to create some delphi objects that will make it easy to read the file https://github.com/PKGeorgiev/Delphi-JsonToDelphiClass
  10. @FPiette and @Angus Robertson I spoke to the original Author of the component and he was fine having it included into the ICS library. See below. My version has a few minor improvements and you can include that as well.
  11. Here are my thoughts on the tool - hopefully not too obvious for you @Vincent Parrett - Have a default set of template dproj files that should suit most people (maybe different ones for handling different platforms or strip out unneeded stuff like project magician) - Ability to download templates for new versions of Delphi - perhaps these templates could just be stored in a git repository that people could update with git - Option for custom dproj's though also able to be downloaded from a git project - Spit out files required for Delphi Package Manager
  12. @Vincent Parrett I thought I had seen someone write a tool that did this... but haven't been able to find it again after searching for it.
  13. I would like to suggest for the next version of ICS, the naming of the packaging be updated to follow the document from @Vincent Parrett from Finalbuilder found at https://www.finalbuilder.com/resources/blogs/advice-for-delphi-library-authors This would help with a component I use in project I am developing when new versions of Delphi come out and also help other developers who use ICS in packages. https://github.com/geoffsmith82/delphi-mqtt Most people will not come across this issue unless they create a component that uses ICS.
  14. Geoffrey Smith

    Sending Email via GMail Using OAuth 2.0 via Indy

    I believe the problem with your code is you are not base64url encoding the message. If you have Delphi 11, you could add the code fragment below to your code and I think it should work. uses System.NetEncoding; var MSEncoded : TStringStream; begin MSEncoded := TStringStream.Create; IdMessage.SaveToStream(MS); TNetEncoding.Base64URL.Encode(MS, MSEncoded); end;
  15. Geoffrey Smith

    RAD Server change password for user

    For anyone who is looking for this in the future.... From https://docwiki.embarcadero.com/RADStudio/Sydney/en/Tutorial:_RAD_Server_Client_Application_to_Manage_RAD_Server_Users#Updating_the_RAD_Server_User_Password_Stored_in_the_RAD_Server_Engine where ListView1.Selected.Detail = _id of the user you want to update procedure TForm1.UpdatePasswordClick(Sender: TObject); var LEditedUser: TJSONObject; LUpdatedAt: TBackendEntityValue; begin try if ListView1.Selected <> nil then begin LEditedUser := TJSONObject.Create; LEditedUser.AddPair('password',editedPassword.Text); BackendUsers1.Users.UpdateUser(TListViewItem(ListView1.Selected).Detail,LEditedUser,LUpdatedAt); editedPassword.Text:=''; end; finally LEditedUser.Free; end; end;
×