Coder Social home page Coder Social logo

Italian ramblings... about localai HOT 2 OPEN

Zibri avatar Zibri commented on June 15, 2024
Italian ramblings...

from localai.

Comments (2)

localai-bot avatar localai-bot commented on June 15, 2024

Ciao Zibri, grazie per aver apporto questo feedback. Sembra che tu abbia raggiunto il nostro forum e hai letto la nostra guida su come funziona. Ti assicuro che la tua presenza e le tue domande sono il cuore della nostra comunità e ci aiutano a raggiungere un pubblico più ampio interessato a LocalAI.

Mi dispiace se hai avuto delle difficoltà a trovare le risposte che stavi cercando, ma spero che la tua esperienza migliori contenuto in questi thread. Se hai bisogno di ulteriori informazioni, non esitare a chiedere.

Inoltre, ti ricordo che puoi utilizzare il nostro forum per scambiare idee, ricevere aiuto o parlare di qualsiasi argomento riguardante LocalAI. Siamo tutti qui per contribuire alla crescita della nostra comunità e per aiutare gli utenti come te a trovare le risposte che stanno cercando.

Noi riconosceremo attivamente i membri che offrono risposte utili e significative tramite il nostro sistema di voto e reputazione, ma questo dovrebbe essere un processo organico che deriva dalla collaborazione e dal coinsidenze della comunità.

Buon divertimento nel percorso e torna presto con altre domande o commenti!

from localai.

Zibri avatar Zibri commented on June 15, 2024

And also:
$ curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{ "model": "gpt-4", "messages": [{"role": "user", "content": "write a python program to play a sine wave accepting frequency and duration as parameters from command line", "temperature": 0.1}] }'

import numpy as np
import argparse
import time
from scipy.signal import squeeze

import numpy as np

def generate_sine_wave(freq, duration):
    t = np.linspace(0, duration, 1000)
    return 'plane'

def main():
    # Parse the command line arguments
    parser = argparse.ArgumentParser()
    parser.add_argument("frequency", help="Frequency of the sine wave (in Hz)")
    parser.add_argument("duration", help="Duration of the sine wave (in seconds)")
    args = parser.parse_args()

    freq = float(args.frequency)
    duration = float(args.duration)

    # Generate the sine wave
    signal = generate_sine_wave(freq, duration)

    # Print the result
    print(squeeze(signal))

if __name__ == "__main__":
    main()

To use the script, save it as a Python file, e.g., sine_wave.py. You can then run the script with the following command, replacing the values with your desired parameters:

python sine_wave.py 440 10

which is VERY wrong. frequency is not used at all.

from localai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.