import {ask_gpt, initiate_gpt} from 'backend/openai.js'; import wixChatBackend from 'wix-chat-backend'; import wixData from 'wix-data'; export function wixChat_onMessage(event) { if(event.direction === 'VisitorToBusiness') { console.log('Chat was commenced'); commence(event); } } const commence = (event) => { wixData.query('gpt_chat').eq('channelId', event.channelId).find() .then( async(res) => { console.log('Query comepleted'); if(res.items.length > 0) { //Existing Chat let gpt_res = await ask_gpt(event.payload.text, event.sender.id) gpt_response(gpt_res, event.channelId, event.payload.text); } else { //New Chat let obj = { channelId: event.channelId, userId: event.sender.id }; wixData.insert('gpt_chat', obj); let gpt_res = await initiate_gpt(event.sender.id) let gpt_res2 = await ask_gpt(event.payload.text, event.sender.id) gpt_response(gpt_res2, event.channelId, event.payload.text); } }); } const gpt_response = (gpt, chid, prev) => { let obj = { "messageText": gpt.choices[0].text, "channelId": chid, "sendAsVisitor": false }; console.log(obj); wixChatBackend.sendMessage(obj) .then( () => { console.log("Chat message sent"); }) .catch( (error) => { console.log(error); }); } //Sample event VisitorToBusiness: // { // "channelId":"0379888f-e5cb-30c4-86fc-4d0e1ce6a827", // "sequence":1676742002559626, // "type":"TEXT", // "summary":"Testing Again", // "participantId":"e2a75cd0-a60b-4d0a-abb5-279fc64a9f10", // "createdDate":"2023-02-18T17:40:02.559Z", // "metadata":{}, // "payload":{ // "text":"Testing Again" // }, // "direction":"VisitorToBusiness", // "sender":{ // "role":"Visitor", // "id":"e2a75cd0-a60b-4d0a-abb5-279fc64a9f10" // } // }
top of page
Search
Writer's pictureDiego Munoz

"Shine Bright with Handmade Sterling Silver Jewelry: Embrace Uniqueness and Sustainability!"

Hello everyone, and welcome to my blog where today we are going to talk about unique handmade sterling silver jewelry.

Sterling silver is a popular material used for jewelry making because of its durability, beauty, and affordability. But what makes sterling silver jewelry unique and special is when it's handmade. Handmade jewelry means each piece is crafted by hand, making it one of a kind and unique.

One of the most interesting things about handmade sterling silver jewelry is the personal touch each piece has. The artist's creativity and style are showcased in each piece, creating a distinct character and flair. Whether you are looking for something elegant and sophisticated or fun and playful, handmade sterling silver jewelry offers a vast range of styles to choose from.

One of the great things about handmade sterling silver jewelry is the versatility. It can be dressed up or down, making it perfect for any occasion. Whether you are heading to the office or out on a date night, there is a piece of handmade sterling silver jewelry that will perfectly suit your needs.

Moreover, handmade sterling silver jewelry is a great option for those who prefer sustainable and eco-friendly options. Unlike mass-produced jewelry, handmade jewelry is crafted with care, using high-quality materials, and reducing waste. Additionally, because each piece is handmade, it often involves less machinery and energy, making it a more sustainable option for consumers.

So, whether you are looking for a unique piece of jewelry to add to your collection or a thoughtful gift for someone special, handmade sterling silver jewelry is an excellent option. The unique character, personal touch, versatility, and sustainability make it a valuable investment for years to come.

Thank you for watching, and I hope you enjoyed learning about unique handmade sterling silver jewelry. Please share your thoughts and comments below, and don't forget to subscribe to our channel for more exciting blogs.

14 views0 comments

Comentários


bottom of page