התכונה 'פעולות שיחה' הוצאה משימוש ב-13 ביוני 2023.
כאן תוכלו לקרוא מידע נוסף על ההוצאה משימוש של 'פעולות שיחה'.
הרצת הקוד לדוגמה
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
בשלב הזה, אתם מוכנים להריץ את הדוגמה וליצור שאילתה.
בפקודה הבאה:
מחליפים את my-dev-project
ב-
מזהה הפרויקט ב-Google Cloud Platform של הפרויקט בקונסולה ל-Actions.
נוצר. כדי למצוא את מזהה הפרויקט ב-Actions Console,
בוחרים את הפרויקט, לוחצים על סמל גלגל השיניים ובוחרים הגדרות הפרויקט.
מחליפים את my-model
בשם המודל שרוצים ליצור
שנוצר בשלב הקודם.
googlesamples-assistant-pushtotalk --project-id my-dev-project --device-model-id my-model
מקישים על מקש Enter ומנסים כמה מהשאילתות הבאות:
- מי אני?
- מה השעה?
- מה מזג האוויר בתל אביב?
אם Assistant לא מגיבה, פועלים לפי ההוראות לפתרון בעיות.
כדי לשנות את השפה של Google Assistant או כדי להפעיל תוצאות אישיות,
להשתמש באפליקציה של Google Assistant.
איתור מזהה המופע של המכשיר
כשתריצו את הדוגמה בפעם הראשונה, היא תיצור מופע מכשיר
למכשיר מסוים. המופע של המכשיר הזה ישויך לדגם המכשיר
שהגדרתם כדי להריץ את הדוגמה. אתם יכולים גם ליצור את המכונה בעצמכם
באמצעות כלי הרישום.
בדוגמה נשמרים גם מזהי מודלים וגם מזהי מכונות. אם תריצו את הדוגמה בלי לספק
את המזהים האלה כארגומנטים, כברירת מחדל ייעשה שימוש במזהים השמורים.
מאתרים את מזהה המופע של המכשיר בפלט של הדוגמה.
INFO:root:Connecting to embeddedassistant.googleapis.com
WARNING:root:Device config not found: [Errno 2] No such file or directory: '/home/pi/.config/googlesamples-assistant/device_config.json'
INFO:root:Registering device
INFO:root:Device registered: 0eea18ae-d17e-11e7-ac7a-b827ebb8010f # Device instance ID
Press Enter to send a new request...
השלב הבא
עכשיו, כש-Google Assistant פועלת במכשיר, זה הזמן
להרחיב אותו. כאן אפשר לעיין בשלבים האפשריים הבאים
או ממשיכים ליצירת פעולות במכשיר.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-09-07 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2024-09-07 (שעון UTC)."],[[["Run the provided command, replacing placeholders with your project and model IDs, to initiate a sample query."],["Test the setup with example queries like \"Who am I?\", \"What time is it?\", or weather-related questions."],["Locate the device instance ID within the sample's output for future use and potential troubleshooting."],["Refer to provided resources for troubleshooting, language settings, and next steps in extending device functionality."]]],["To run the sample, replace placeholders in the provided command with your Google Cloud project ID and model name. Execute the command and try example queries. If no response, consult troubleshooting. The first run generates a unique device instance ID, displayed in the output, and saves it for future use. The command can be run without arguments if the ID was saved. You can change the language or add personal settings through the Google Assistant app. Further steps like extending or adding device actions are possible.\n"]]