Problem with the shell command on a local server

2024-12-30 Thread jbv via use-livecode
Hi list, Long story short : I am using LM Studio as a local server to send requests to an LLM model. I use the shell command in LC 9.6 with curl on MacOS Sequoia 15.1.1. The request looks like that : curl http://127.0.0.1:1234/v1/embeddings \ -H "Content-Type: application/json" \ -d '{

Re: Problem with the shell command with a local server

2024-12-30 Thread jbv via use-livecode
s producing the erroneous third line, you may have to test the range of each line. Bob S On Dec 30, 2024, at 8:13 AM, jbv via use-livecode wrote: Hi list, Long story short : I am using LM Studio as a local server to send requests to an LLM model. I use the shell command in LC 9.6 with cur

Re: Problem with the shell command with a local server

2024-12-30 Thread jbv via use-livecode
xt" }' Le 2024-12-30 13:06, Mark Wieder a écrit : On 12/30/24 08:13, jbv via use-livecode wrote: Because of that I can't parse the json and I get an error with JsonImport. What am I doing wrong ? How can I fix it ? A couple of curl commandline options to try: 1. use the --si

Problem with the shell command with a local server

2024-12-30 Thread jbv via use-livecode
Hi list, Long story short : I am using LM Studio as a local server to send requests to an LLM model. I use the shell command in LC 9.6 with curl on MacOS Sequoia 15.1.1. The request looks like that : curl http://127.0.0.1:1234/v1/embeddings \ -H "Content-Type: application/json" \ -d '{

Re: Best way to base64encode a jpeg file ?

2025-02-03 Thread jbv via use-livecode
Le 2025-02-03 11:07, Bob Sneidar via use-livecode a écrit : I heard that the base64encode puts a carriage return at a certain interval of characters (not sure how many). Bob S Yes, that's true, but even when I removed the returns it didn't work. __

Interacting locally with LC and AI models

2025-02-03 Thread jbv via use-livecode
Hi list, Someone asked me privately, so I thought that maybe others would be interested in a simple way to interact between LC and AI models locally on their machine. The method uses Ollama, which is available for Mac, Win and Linux : https://ollama.com 1- Download and install Ollama (plenty of

Re: Best way to base64encode a jpeg file ?

2025-02-05 Thread jbv via use-livecode
Richard & Mark, Thank you both for your suggestions. I actually made some progress, as there were 2 different issues : 1- the syntax of the multimodal json curl must be {"type" : "image_url", "image_url" : {"url": "data:image/jpeg;base64,{_BASE64_}"}} instead of {"type" : "image_url", "i

Re: Best way to base64encode a jpeg file ?

2025-02-04 Thread jbv via use-livecode
I am stuck. No matter what I try, I always get the same error : "url" field must be a base64 encoded image So I'm back to my very first question : how to base64encode a jpeg file in LC to be used in a regular multimodal json curl request... Le 2025-02-03 19:00, Richard Gaskin via use-livecode

Re: Best way to base64encode a jpeg file ?

2025-02-06 Thread jbv via use-livecode
Hi Monte, It works ! Thank you very much ! jbv Le 2025-02-05 04:35, Monte Goulding via use-livecode a écrit : Hi jbv Here is my code for base64 encoding : put URL ("file:" & "myfile.jpg") into timagedata Use `binfile:` here instead of `file:` so the engine doesn’t treat the data as nativ

Closing a tab in a browser widget

2025-02-11 Thread jbv via use-livecode
Hi list, Is it possible to close a tab of a website displayed inside a browser widget ? I am on Mac and I know this can be done using AppleScript, but is there an LC-only solution ? Thank you in advance. jbv ___ use-livecode mailing list use-livecode@

Best way to base64encode a jpeg file ?

2025-02-02 Thread jbv via use-livecode
Hi list, I need to base64encode a serie of jpeg files to include the code in a curl request. What is the best way to do that ? Do I need to import each file into an image control and base64encode the "text" of the image ? Thank you, jbv ___ use-liveco

Re: Best way to base64encode a jpeg file ?

2025-02-03 Thread jbv via use-livecode
Le 2025-02-02 21:10, Richard Gaskin via use-livecode a écrit : jbv wrote: I need to base64encode a serie of jpeg files to include the code in a curl request. What is the best way to do that ? Depends. What's on the receiving end, and what options does it support? Actually, my question w

Re: Azure or AWS ?

2025-01-23 Thread jbv via use-livecode
For the record, I tried to register at Azure to test their free offer, but the registration includes a tel.# validation that doesn't work... So I tried AWS for their free offer, registration went fine, but their free offer doesn't include GPU usage. So now I am trying Google Colab. Regarding Appw

LC and embedding

2025-01-23 Thread jbv via use-livecode
Hi again list, Has anyone tried to do text embedding from LC on a CPU-only device ? Thank you in advance. jbv ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription pre

Azure or AWS ?

2025-01-18 Thread jbv via use-livecode
Hi list, I have a small LC desktop app that sends requests via curl to ollama and some AI models. Everything runs fine on my Mac and now I would like to try to move it to the cloud, but I'm not sure which platform to choose. I have read a few blogs like this one : https://www.shiksha.com/online-c

Re: Question about messages

2025-03-17 Thread jbv via use-livecode
Le 2025-03-17 09:27, Craig Newman via use-livecode a écrit : If you place a simple one-liner in “more stuff”, like “put random(99) into msg” does that work? Another words, is it something in your own “more stuff” that is the problem? Craig, It stops working. It seems like messages aren't sen

Another Datagrid question

2025-03-16 Thread jbv via use-livecode
Hi list, Is there anything specific to consider/include about datagrids when building a standalone, like inclusions ? When I look at the inclusions list in the "standalone settings" dialog, I see "Datagrid" but I thought that selecting "search for required inclusions when saving the standalone" w

Question about messages

2025-03-17 Thread jbv via use-livecode
Hi list, Here's what I am trying to do : on opencard send "handler1" to me with messages end opencard on handler1 send "handler2" to me in 200 millisec -- more stuff end handler1 on handler2 if condition then send "handler2" to me in 200 millisec end if end handler2 The i

Re: Question about messages

2025-03-17 Thread jbv via use-livecode
Le 2025-03-17 10:01, Alex Tweedly via use-livecode a écrit : That sounds quite likely. If handler1 is running continuously, then other messages will not happen. I'd suggest putting various    wait for 0 seconds with messages inside the running loops of handler1, in order that pending messages

Issue with png images in group and "mouseup" detection

2025-04-19 Thread jbv via use-livecode
Hi list, I have a group containing several fields and 2 images, and these images are of png format with some transparent areas. I need to detect "mouseup" events on these elements with a "on mouseup" handler in the group script. When I click on the transparent area of each image, "mouseup" is det

Re: This AI stuff is taking off and I see next to nothing from LC

2025-02-19 Thread jbv via use-livecode
Hi, I am doing a lot of things as a hobbyist with LC and IA, either locally or on a vps with ollama, and also with the OpenAI API. That includes embedding, vision, syntaxic trees of sentences, etc. A few days ago, I have posted on this forum the code I use to interact with ollama via curl reques

Datagrid question

2025-03-03 Thread jbv via use-livecode
Hi list, I have a datagrid with dgStyle as "table". I have populated the columns and the dgText. Now I need to adjust the width of each column by script : put "100,120,150" into Lw set the dgColumnWidths of group "DataGrid 1" to Lw But nothing changes when running the above commands. What am I

Re: ChatGPT for LC scripting

2025-03-07 Thread jbv via use-livecode
Le 2025-03-06 19:04, Bob Sneidar via use-livecode a écrit : Your supposition is incorrect. We are not ALL using these gadgets. I for one never will. I for one use these tools only for things I am not familiar with, like python scripts for instance, with the risk of using pieces of code I don't

Re: Datagrid question

2025-03-04 Thread jbv via use-livecode
Le 2025-03-03 16:05, Bob Sneidar via use-livecode a écrit : What you are looking for is dgProp [“column widths”] which takes a comma delimited list. The API for datagrid properties is here: https://lessons.livecode.com/m/datagrid/l/7343-data-grid-properties Bob S Thank you, that works. New

Re: Datagrid question

2025-03-04 Thread jbv via use-livecode
Le 2025-03-04 13:07, Klaus major-k via use-livecode a écrit : ... set the dgProp["sort by column"] of group "your DG here..." to empty ... :-) I tried : set the dgProp["sort by column"] of group "your DG here..." to false Thank you. jbv ___ use-live

Re: Datagrid question

2025-03-04 Thread jbv via use-livecode
Le 2025-03-04 13:07, Klaus major-k via use-livecode a écrit : ... set the dgProp["sort by column"] of group "your DG here..." to empty ... Well, actually it doesn't work as expected : the columns aren't sorted when filled with data, but users can still click on column headers and sort the data.

Datagrid again

2025-04-04 Thread jbv via use-livecode
Hi list, One more question : is there a way to hide the top row of a datagrid when no column names need to be displayed ? I tried set the dgProp["columns"] of group "DataGrid 1" to empty but it displays "col1. col2. etc" by default. Thanks you in advance. jbv _

Re: Inclusions issue when building standalones

2025-05-27 Thread jbv via use-livecode
: how does auto-detection of inclusions work ? Does it analyze the structure of the stacks, or does it scan the scripts for commands relative to libraries ? Best, Le 2025-05-24 09:13, jbv via use-livecode a écrit : Hi list, I am trying to update a stack created with LC 9.6.9 using LiveCode

Inclusions issue when building standalones

2025-05-24 Thread jbv via use-livecode
Hi list, I am trying to update a stack created with LC 9.6.9 using LiveCode Community 9.6.3 . This stack uses various libraries : dialogs, xml, zip, internet, table, datagrid... In the IDE everything works as expected. The problem begins with inclusions when I try to build standalones : - if I c

Choosing a vps hosting with GPU

2025-06-17 Thread jbv via use-livecode
Hi list, I have just finalized an app that will process a lot of text and images through AI models, with a main loop running for days (or even weeks) that will send ten of thousands of API requests to Ollama and/or Llama.cpp, and feed the returned data into various DBs. I have made numerous test

LiveCode Community on Mac M4 ?

2025-06-26 Thread jbv via use-livecode
Hi list, Has anyone tried to use a version of LiveCode Community on a Mac M4 with Sequoia ? Every installation I tried crashed at startup (9.6.2 fo instance), although they work fine on iMac intel. And Rosetta 2 doesn't seem to help... Am I missing something ? Thank you in advance. jbv

Re: how to format data in LC for posting them to a PHP script?

2025-07-06 Thread jbv via use-livecode
Hi Klaus, This should work : put "ben=USER&password=PWD&sprach=de" into tData post urlencode(tData) to URL "http://XXX/X.php"; jbv Le 2025-07-06 10:17, Klaus major-k via use-livecode a écrit : Hi friends, quick question, how to format the data in LC for posting them to a PHP script lik

Browser widget and javascript

2025-06-28 Thread jbv via use-livecode
Hi list, When using a browser widget, I can get the whole code of a page displayed in the browser with : put the htmlText of widget "Browser" into myHtml I can also run chunks of javascript inside the browser, even if the code isn't there, for instance : do "var T=document.getElementsByCla

Re: LiveCode Community on Mac M4 ?

2025-06-27 Thread jbv via use-livecode
Le 2025-06-27 15:47, Roger Guay via use-livecode a écrit : I believe it was Richmond, but I’ve tried it on my M1 Mac and I Couldn’t get it to work. Did it crash at startup ? Did you use Rosetta ? Which Community version dis you try ? ___ use-live

Re: LiveCode Community on Mac M4 ?

2025-06-27 Thread jbv via use-livecode
I think I read on this list or on the forum that someone used it on M1 or M2 Mac. Perhaps with Rosetta ? Le 2025-06-27 12:12, Bob Sneidar via use-livecode a écrit : Did Community ever work on ARM based processors? Bob S On Jun 26, 2025, at 10:35 PM, jbv via use-livecode wrote: Hi list

Re: Default backdrop

2025-07-24 Thread jbv via use-livecode
Thank you Klaus. I don't see how I could have missed that... Le 2025-07-24 11:57, Klaus major-k via use-livecode a écrit : Hi jbv, uncheck "Backdrop" in menu "View", that should do the trick. :-) ___ use-livecode mailing list use-livecode@lists.run

Default backdrop

2025-07-24 Thread jbv via use-livecode
Hi list, For the past few months at startup of the IDE, no matter which version of LC I use, the backdrop is set to white by default. And each time I have to set it to "none" in the message box. Is there a way to have the backdrop set to "none" by default at startup ? I haven't found anything in

How to detect a change in a global variable ?

2025-07-26 Thread jbv via use-livecode
Hi list, Let's say I have a portion of a script like this : global myVar put 0 into myVar -- some code repeat until myVar > 0 end repeat -- some code and the content of global myVar being changed in a handler of another control : on mouseUp global myVar put 1 into myVar

Changing the scripts of a standalone

2025-08-02 Thread jbv via use-livecode
Hi list, Years ago I built a desktop app with LC, and the client is still using it. Users of the app work in the same company but are scattered in different cities. Since there were small differences between cities, I found it easier to build a slightly different version of the app for each cit

<    1   2   3