Chat with AI models using text and videos. Also known as video-text-to-text
Basic usage
Send a conversation to a model to generate text from text and audio
import Bytez from 'bytez.js';// insert your keyconst sdk = new Bytez('BYTEZ_KEY');// choose your modelconst model = sdk.model('llava-hf/LLaVA-NeXT-Video-7B-hf');// provide the model with inputconst input = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this video" }, { "type": "video", "url": "https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/main/sample_demo_1.mp4" } ] }];// send to the modelconst { error, output } = await model.run(input);// observe the outputconsole.log({ error, output });
from bytez import Bytez# insert your keysdk = Bytez("BYTEZ_KEY")# choose your modelmodel = sdk.model("llava-hf/LLaVA-NeXT-Video-7B-hf")# provide the model with inputinput = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this video" }, { "type": "video", "url": "https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/main/sample_demo_1.mp4" } ] }]# send to the modelresult = model.run(input)# observe the outputprint({"error": result.error, "output": result.output})
import Bytez from 'bytez.js';// insert your keyconst sdk = new Bytez('BYTEZ_KEY');// choose your modelconst model = sdk.model('llava-hf/LLaVA-NeXT-Video-7B-hf');// provide the model with inputconst input = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this video" }, { "type": "video", "url": "https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/main/sample_demo_1.mp4" } ] }];// provide the model with paramsconst params = { "temperature": 0};// send to the modelconst { error, output } = await model.run(input, params);// observe the outputconsole.log({ error, output });
from bytez import Bytez# insert your keysdk = Bytez("BYTEZ_KEY")# choose your modelmodel = sdk.model("llava-hf/LLaVA-NeXT-Video-7B-hf")# provide the model with inputinput = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this video" }, { "type": "video", "url": "https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/main/sample_demo_1.mp4" } ] }]# provide the model with paramsparams = { "temperature": 0}# send to the modelresult = model.run(input, params)# observe the outputprint({"error": result.error, "output": result.output})
import Bytez from 'bytez.js';// insert your keyconst sdk = new Bytez('BYTEZ_KEY');// choose your modelconst model = sdk.model('llava-hf/LLaVA-NeXT-Video-7B-hf');// provide the model with inputconst input = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this video" }, { "type": "video", "url": "https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/main/sample_demo_1.mp4" } ] }];// set streaming to "true"const stream = true;// send to the modelconst readStream = await model.run(input, stream);let text = '';for await (const tokens of readStream) { text += tokens; console.log(tokens);}// observe the outputconsole.log({ text });
from bytez import Bytez# insert your keysdk = Bytez("BYTEZ_KEY")# choose your modelmodel = sdk.model("llava-hf/LLaVA-NeXT-Video-7B-hf")# provide the model with inputinput = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this video" }, { "type": "video", "url": "https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/main/sample_demo_1.mp4" } ] }]# set streaming to "true"stream = True# send to the modelreadStream = model.run(input, stream=stream)text = ""for tokens in readStream: text += tokens print(tokens)# observe the outputprint({"text": text})
import Bytez from 'bytez.js';// insert your keyconst sdk = new Bytez('BYTEZ_KEY');// choose your modelconst model = sdk.model('llava-hf/LLaVA-NeXT-Video-7B-hf');// provide the model with inputconst input = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this video" }, { "type": "video", "url": "https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/main/sample_demo_1.mp4" } ] }];// provide the model with paramsconst params = { "temperature": 0};// set streaming to "true"const stream = true;// send to the modelconst readStream = await model.run(input, params, stream);let text = '';for await (const tokens of readStream) { text += tokens; console.log(tokens);}// observe the outputconsole.log({ text });
from bytez import Bytez# insert your keysdk = Bytez("BYTEZ_KEY")# choose your modelmodel = sdk.model("llava-hf/LLaVA-NeXT-Video-7B-hf")# provide the model with inputinput = [ { "role": "user", "content": [ { "type": "text", "text": "Describe this video" }, { "type": "video", "url": "https://huggingface.co/datasets/raushan-testing-hf/videos-test/resolve/main/sample_demo_1.mp4" } ] }]# provide the model with paramsparams = { "temperature": 0}# set streaming to "true"stream = True# send to the modelreadStream = model.run(input, params, stream)text = ""for tokens in readStream: text += tokens print(tokens)# observe the outputprint({"text": text})