Prerequisites
- A Replicate account with an API token.
Important Notes
- Replicate usage may incur costs based on your Replicate plan.
- Be mindful of sensitive data and consider security measures when integrating with external services.
Chat Completions
Create a Table: In Pixeltable, create a table with columns to represent your input data and the columns where you want to store the results from Replicate.| prompt | response |
|---|---|
| What foods are rich in selenium? | Selenium is an essential mineral that plays a crucial role in various bodily functions, such as protecting cells from damage, supporting immune function, and acting as an antioxidant. Here are some foods that are rich in selenium: 1. Brazil nuts: Brazil nuts are one of the richest sources of selenium, with a single nut providing about 60-90 micrograms (mcg) of selenium. This is equivalent to the daily recommended intake of selenium. 2. Fish: Fatty fish like tuna, mackerel, and sardines ar ...... e of selenium, with a 3-ounce serving providing about 30 mcg of selenium. 5. Chicken: Chicken breast is also a good source of selenium, with a 3-ounce serving providing about 25 mcg of selenium. 6. Eggs: Eggs are a good source of selenium, with a large egg providing about 20 mcg of selenium. 7. Wheat germ: Wheat germ is a good source of selenium, with a 1/4 cup serving providing about 20 mcg of selenium. 8. Brown rice: Brown rice is a good source of selenium, with a 1/2 cup serving providing |
Image Generation
Here’s an example that shows how to use Replicate’s image generation models with Pixeltable. We’ll use the FLUX Schnell model.| prompt | output |
|---|---|
| Draw a pencil sketch of a friendly dinosaur playing tennis in a cornfield. | ["https://replicate.delivery/yhqm/DH2e9QRelTr0KEhcfciu9GHPINCt1rJ9kAShds91nCG7grYnA/out-0.webp"] |
pxt.Image in a new computed column:
| image |
|---|