8go / 8go/matrix-commander

Anyway to obtain media files from historical events by matrix-commander with help of an EventId?

Aperta
#173 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
enhancement help wanted
Lingua principale
Python
Stelle
754
Fork
69
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Fist of all - thank you for this great tool!

I've been using it quite some time now to prompt my LLMs over Matrix using prefixes.
I was using `matrix-eno-bot` before but lately I wanted to extend some features myself.
My plan is to **reply** to image / audio files to send them to AI tools like whisper or LLaVA for inferencing.

But from my understanding `Eno` is not able to download media natively so I switched over to MC to make that possible.

I glued some [code](https://github.com/v1-valux/ollama-mx/blob/2ed25946a27ae29880117a6c0ef5332f3a1dc0fb/ollama_mx.py#L196) together and tried to solve it via downloading and saving media in a media folder.
The downside of my current solution is that all media needs to be downloaded by the bot *first* for it to process it later.

So one possible solution I thought of, was making an Rest-API Call via MC to obtain media file URLs before downloading them, processing them, and delete them afterwards, to make it more lightweight..

Unfortunately, the event that I can obtain by using the following command, is encrypted:

```shell
matrix-commander --no-ssl --store ./store --rest get '' https://matrix.exmaple.com_matrix/client/v3/rooms/$ROOM_ID/event/$EVENT_ID?access_token='$ACCESS_TOKEN'
```

Is there any way to add this functionality to MC or similarly are we able to decrypt a historical event to obtain a media file / the mxc-url otherwise via Rest API?

Best Regards
o/

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

The issue is about adding a feature to matrix-commander to fetch and decrypt historical media events via the Matrix API. Start by examining the existing code for media handling and REST API calls in the project. Look at how encryption is currently managed, possibly in the matrix-nio library. The goal is to extend the CLI to accept an EventId, retrieve the event, decrypt it if needed, and obtain the mxc-url or media file. Check the linked user code for inspiration, but note it downloads all media first. Testing will involve setting up a Matrix room with encrypted media and verifying the new command works.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, shell
Ambito
api, cli
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.