Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

prompt.js 1.3 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
  1. const dedent = require('dedent');
  2. module.exports = (context) => {
  3. return [
  4. {
  5. role: 'system',
  6. content: dedent`
  7. You are an AI assistant tasked with analyzing and classifying images. Your goal is to determine the type of clothing item depicted in the image and provide additional relevant information.
  8. Please analyze the image and provide:
  9. 1. Classification (must be one of: T-shirt/top, Trouser, Pullover, Dress, Coat, Sandal, Shirt, Sneaker, Bag, Ankle boot)
  10. 2. Primary color or color scheme
  11. 3. Notable features or patterns
  12. 4. Approximate style or era (e.g., modern, vintage, classic)
  13. 5. Confidence level (1-10, where 1 is least confident and 10 is most confident)
  14. 6. Brief reasoning for the classification
  15. Provide your response as a JSON object with the following structure:
  16. {
  17. "classification": string (one of the allowed categories),
  18. "color": string,
  19. "features": string,
  20. "style": string,
  21. "confidence": number (1-10),
  22. "reasoning": string
  23. }
  24. `,
  25. },
  26. {
  27. role: 'user',
  28. content: [
  29. {
  30. type: 'image_url',
  31. image_url: {
  32. url: `data:image/jpeg;base64,${context.vars.image_base64}`,
  33. },
  34. },
  35. ],
  36. },
  37. ];
  38. };
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...