בירור | עבודה נכונה עם GPT בתכנות
-
@יעקב-מ-פינס כתב בבירור | עבודה נכונה עם GPT בתכנות:
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
@יעקב-מ-פינס כתב בבירור | עבודה נכונה עם GPT בתכנות:
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
@יעקב-מ-פינס כתב בבירור | עבודה נכונה עם GPT בתכנות:
דווקא ביממה האחרונה אני לא בדיוק מצליח להתקדם, אני פונה אליו שוב ושוב עם אותה בעיה וכל פעם הוא עושה איזה שינוי אבל שום דבר לא משתנה.בעיה בשורה ספציפית בקוד או משהו שלא מסתדר כמו שאתה רוצה?
משהו שלא מסתדר
תנסה לעשות חיפוש גוגל ממוקד (באנגלית) איך מבצעים את הפונקציה שאתה רוצה
לעיתים זה ילך יותר מהר מלשכנע את gpt לעשות את זההבעיה היא שזה קצת מורכב בשבילי.
לדוגמא, אני רוצה שתיבת ההודעות הפנימית תעבוד כמו תיבת מייל רגיל- מבחינת שרשורים שיתחברו אחד לשני, תגובה לשרשור תחשב כהודעה חדשה וכדו'
צריך להכיר את כל המבנה כדי לענות על זה, לא? -
@אלף-שין כתב בבירור | עבודה נכונה עם GPT בתכנות:
@aiib
שאלת המון שאלות,
אנסה לפרק אותם,יש שם המון מודלים, תבחר ותשווה, הסיני עובד יותר מהר מטיל היפר סוני.... כמו כולם שם..... [ואגב גם התמלול]
הכל פתוח בכל סינוני הנטפרי למיניהם כמה שידוע לי, [כולל במחמירים]
לא כזה המון... רובם זה אותו מודל עם גדלים שונים
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
אבל זה לא עוזר לי לנוחות של העבודה, נכון? (חוץ ממהירות התגובה, זה לא עוזר לי לעבודה עצמה שלא צריך להעתיק כל קטע וכדו')
זה תלוי בכמה דברים.
כלומר? הוא לא מתחבר לעורך קוד וכדו', נכון?
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
תעבור למודלים שהבאתי לי ובלצג.
?
שלא יהיה לך שגיאות ובלצג [קרדיט- @משחזר מידע ו @צללית]
בלצג?!??!
-
@aiib
ובכן הנה תשובת המודול הסיני לבקשתך בענין השרשורים: [תוך 2 שניות!]
<think>
Okay, so the user wants to set up an internal message box that works like a regular email box. They mentioned things like message threads connecting to each other and replies counting as new messages. I need to figure out how to structure this.First, I should break down the requirements. They want threads, which means messages need to be grouped together when they're replies to each other. So, I'll need a way to link messages. Maybe each thread can have an ID, and each message within the thread can reference that ID.
Next, when someone replies to a thread, it should count as a new message. That makes sense because each reply is a separate message but part of the same conversation. So, each message should have its own unique ID, and also a reference to the thread ID.
I should also think about how to store these messages. A database seems necessary. I'll need tables for messages and threads. The messages table can have columns like message_id, thread_id, sender, recipient, subject, body, timestamps, and status. The threads table can have thread_id, subject, last_message_id, and timestamps.
Now, for the functionality. Sending a new message should create a new thread if it's the first message between two users on that subject. If it's a reply, it should add to an existing thread. So, I'll need a way to check if a thread exists when a new message is sent.
Replying should generate a new message linked to the existing thread. Also, the system needs to handle multiple participants in a thread, so maybe a separate table for participants to track who's involved and their status, like read or unread.
Notifications are important too. When a new message is sent, the recipient should get a notification. Maybe using a notifications table to track these.
Searching and filtering will be useful for users. They should be able to search by subject, body, sender, etc. Also, filtering by read/unread or date ranges would improve usability.
I should outline the steps for sending a message: check if the thread exists, if not create a new one, then add the message, update the thread, and create a notification. For replying, it's similar but the thread already exists, so just add the message and update.
I need to make sure the data model covers all these aspects. Maybe include a participants table to track who's in each thread and their status. Also, a notifications table to handle alerts for new messages.
Testing the model is crucial. I should check if sending a new message creates a thread, replying adds to it, notifications are triggered, and searching works as expected.
Overall, the key points are setting up the database tables correctly, handling message creation and replies, managing notifications, and ensuring the system is scalable and efficient. I think this structure should meet the user's requirements for an email-like internal messaging system.
</think>To create an internal messaging system that functions like a regular email box, with features such as message threads and reply tracking, you need a well-structured data model and clear workflows. Below is a detailed breakdown of how you can design this system:
1. Data Model
Messages Table
Column Name Data Type Description message_id
int
Unique identifier for each message. thread_id
int
Foreign key linking the message to its thread. sender_id
int
User ID of the sender. recipient_id
int
User ID of the recipient. subject
varchar
Subject line of the message. body
text
Content of the message. created_at
datetime
Timestamp when the message was sent. updated_at
datetime
Timestamp when the message was last updated. status
enum
Status of the message (e.g., 'sent', 'read', 'deleted'). Threads Table
Column Name Data Type Description thread_id
int
Unique identifier for each thread. subject
varchar
Subject line of the thread. created_at
datetime
Timestamp when the thread was started. updated_at
datetime
Timestamp when the thread was last updated. last_message_id
int
Foreign key to the most recent message in the thread. Participants Table
Column Name Data Type Description participant_id
int
Unique identifier for the participant. thread_id
int
Foreign key linking to the thread. user_id
int
User ID of the participant. joined_at
datetime
Timestamp when the user joined the thread. status
enum
Status of the participant (e.g., 'active', 'left', 'muted'). Notifications Table
Column Name Data Type Description notification_id
int
Unique identifier for each notification. user_id
int
User ID of the recipient. message_id
int
Foreign key linking to the message. thread_id
int
Foreign key linking to the thread. type
enum
Type of notification (e.g., 'message', 'mention'). created_at
datetime
Timestamp when the notification was created. read_at
datetime
Timestamp when the notification was read. status
enum
Status of the notification (e.g., 'unread', 'read'). 2. Workflows
Sending a New Message
-
Create a New Thread:
- If the message is a new conversation (not a reply), create a new entry in the
Threads
table. - Generate a unique
thread_id
.
- If the message is a new conversation (not a reply), create a new entry in the
-
Create a New Message:
- Insert a new record into the
Messages
table with thethread_id
,sender_id
,recipient_id
,subject
, andbody
. - Update the
last_message_id
in theThreads
table to reference this new message.
- Insert a new record into the
-
Add Participants:
- Add the sender and recipient to the
Participants
table with their respective statuses.
- Add the sender and recipient to the
-
Generate Notifications:
- Create a notification for the recipient in the
Notifications
table.
- Create a notification for the recipient in the
Replying to a Message
-
Identify the Thread:
- Use the
thread_id
from the message being replied to.
- Use the
-
Create a New Message:
- Insert a new record into the
Messages
table with the samethread_id
,sender_id
,recipient_id
,subject
, andbody
.
- Insert a new record into the
-
Update the Thread:
- Update the
last_message_id
in theThreads
table to reference the new message.
- Update the
-
Generate Notifications:
- Create a notification for the recipient in the
Notifications
table.
- Create a notification for the recipient in the
3. Features
Message Threads
- Messages are grouped into threads based on the
thread_id
. - Each thread has a subject and a history of all messages exchanged within it.
Replying to Messages
- Replying to a message creates a new message within the same thread.
- The
last_message_id
in theThreads
table is updated to reflect the most recent message.
Notifications
- Notifications are generated for each new message or reply.
- Users can mark notifications as read or unread.
Participants
- Multiple users can participate in a single thread.
- Participants can have different statuses (e.g., active, left, muted).
Message Status
- Messages can have statuses such as 'sent', 'read', or 'deleted'.
- Deleted messages can be soft-deleted (marked as deleted but not removed from the database).
Search and Filtering
- Users can search for messages by subject, body, sender, or recipient.
- Messages can be filtered by date range, status, or thread.
4. Considerations
Scalability
- Consider sharding or partitioning the database based on
thread_id
oruser_id
for large-scale applications. - Use indexing on frequently queried columns (e.g.,
thread_id
,user_id
,created_at
).
Performance
- Optimize database queries to handle high volumes of messages and threads.
- Consider caching frequently accessed data (e.g., recent messages, active threads).
Security
- Implement proper access controls to ensure that users can only access messages and threads they are authorized to see.
- Encrypt sensitive data such as user IDs and message content if necessary.
User Interface
- Design a user-friendly interface that allows users to view threads, send messages, and manage notifications.
- Provide features like message composition, search, and filtering.
5. Example Use Cases
Use Case 1: Sending a New Message
- User A composes a new message to User B with the subject "Meeting Tomorrow".
- The system creates a new thread with a unique
thread_id
. - The message is saved in the
Messages
table with the newthread_id
. - User B receives a notification about the new message.
Use Case 2: Replying to a Message
- User B opens the message from User A and replies.
- The system identifies the
thread_id
from the original message. - A new message is created in the
Messages
table with the samethread_id
. - The
last_message_id
in theThreads
table is updated. - User A receives a notification about the reply.
6. Testing
Test Case 1: Sending a New Message
- Verify that a new thread is created.
- Verify that the message is saved correctly.
- Verify that the recipient receives a notification.
Test Case 2: Replying to a Message
- Verify that the reply is added to the correct thread.
- Verify that the
last_message_id
is updated. - Verify that the recipient receives a notification.
Test Case 3: Multiple Participants
- Verify that all participants receive notifications when a new message is sent.
- Verify that each participant can view the thread and all messages within it.
7. Conclusion
This structured approach ensures that your internal messaging system functions similarly to a regular email box, with features like message threads, notifications, and participant management. By carefully designing the database schema and implementing the workflows as described, you can create a robust and user-friendly messaging system.
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
בלצג?!??!
כן תלחץ על הקישור שהבאתי במילים קרדיט....
-
-
בניתי את התוכנה הזאת ללא שום ידע בתכנות עם הGPT החדש
script.exe -
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
ניסיתי את הסיני, פחות התלהבתי מGPT אבל אולי אני טועה...
של מטא לא שמעתי שהוא נחשב באמת כדי להתמודד. המעלה שלו הוא קוד פתוח.אין לי מושג מה שמעת ומה שאלת ואת מי וגם זה לא רוולנטי,
פשוט תתחיל לעבוד עם המודלים האלה, הם מהחזקים ביותר,
הגיוון שלהם אמור לספק לך מענה מושלם,
לא חושב שיש מישהוא מקצועי שיגיד לך שזה לא מספיק....@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
שאלת אותו באנגלית?
ברור, זה כלל גדול בכל הדברים האלו, בשביל זה יש טרנסלייט...
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
ניסיתי להדביק את הקוד באתר שהבאת, קיבלתי שגיאה שהוא ארוך מדי...
תדביק בשלבים או במודול אחר....
בהצלחה!!
-
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
בטוח שהכלל הזה עדיין נכון?
כן, ואכמ"ל.
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
זה נראה הגבלה ברמת הגרוק ולא ברמת המודל.
תשנה אותה ידנית בצד ימין.
-
@אלף-שין כתב בבירור | עבודה נכונה עם GPT בתכנות:
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
בטוח שהכלל הזה עדיין נכון?
כן, ואכמ"ל.
דווקא מעניין... אשמח לשמוע!
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
זה נראה הגבלה ברמת הגרוק ולא ברמת המודל.
תשנה אותה ידנית בצד ימין.
את מה בדיוק? ניסיתי לשחק ואני לא בטוח שראיתי הבדל, למה שמישהו יגביל את עצמו מבחירה? -
@A0533057932 כתב בבירור | עבודה נכונה עם GPT בתכנות:
@בנימינה יש לו הגבלה אחרי פרק זמן או כמות שאלות ותשובות
לא התעמקתי לדעת מה ההגבלותהגבלות מזעזעות. זו הבעיה העיקרית של קלוד. למעשה, מגבלות שימוש בתשלום שלו שוות כמעט למגבלות השימוש החינמי בצ'אט GPT לדוגמה.
גימני הוא לא מוצלח בעליל
ליתר דיוק הוא מעולם לא עזר לי
יתכן והוא טוב לאפפסקריפט
אבל בכל הקשור לפייתון למשל הוא פשוט לא יודע מה הוא כותבזה כבר מזמן לא מדויק. הדגמים האחרונים של ג'מיני פשוט נהדרים. ובמיוחד העובדה שהשימוש הוא בלתי מוגבל לחלוטין ולגמרי בחינם. כמובן דרך AI Studio.
אני אישית משתמש 90% מהזמן במודל Gemini 2.0 Flash Thinking. הוא אינטלגנט למדי, מהיר, ועם חלון הקשר של מיליון אסימונים + פלט של עד 65,000 אסימונים הוא פשוט מושלם.
למעשה, אני כבר לא מסוגל להשתמש במודל gpt הסטנדרטי. הוא פשוט כל כך טיפש...
מה שכן, מודל החשיבה o3 mini פשוט מדהים. הקוד שלו מושלם כמעט תמיד ב-shot-0. וגם המגבלה אפילו למשתמשים החינמיים ממש גבוהה.
השילוב המושלם הוא כשמפעילים אצלו את אפשרות החיפוש, שמאפשרת לו למצוא ספריות עדכניות לפי הצורך
-
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
אני מתחיל בתחום...
כרגע אני שואל שאלה בGPT מעתיק את הקוד עובר לVS CODE נכנס לקובץ ומדביק
וכמובן בהתחלה בונה את המבנה קובץ קובץ לפי הוראות של GPT (אני לא עושה כלום לבד... הכל GPT- לא מבין בתכנות...)
האם זאת הדרך הנכונה או שיש דרך יותר יעילה מאשר כל פעם לשנות את הקבצים להעתיק ולהדביק וכו'?תודה
לדעתי, שימוש בתוכנות כמו cline וכדומה פחות מתאים למשתמש מתחיל שבונה את כל הקוד מאפס.
הרבה יותר פשוט להעתיק קוד מלא ממשק צ'אט GPT, או Gemini ב-AI Studio. זה בדרך כלל עובד יותר חלק ויוצר פחות באגיםמכיוון שלמודלי החשיבה העדכניים (o3 mini, gemini flash thinking, deepseek r1) יש מגבלת פלט מאוד גבוהה, אפשר ומומלץ לבקש מהם בכל פעם לתת את הקוד המעודכן במלואו, במקום לעדכן רק שורה או קטע ספציפי
-
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
@אלף-שין כתב בבירור | עבודה נכונה עם GPT בתכנות:
ברור, זה כלל גדול בכל הדברים האלו, בשביל זה יש טרנסלייט...
בטוח שהכלל הזה עדיין נכון?
הרי היום אתה רואה שלמרות שאתה כותב בעברית הוא 'חושב' באנגלית אז מה זה משנה?אתה צודק. אין כמעט משמעות לשפה היום במודלים מתקדמים. יתכן שספציפית במודל r1 זה כן משנה, כי היכולת השפתית שלו קצת פחות טובה
עריכה: מכיוון ש-@אלף-שין דיבר על מודלים קטנים יחסית ופחות טובים, הם אכן הרבה פחות טובים בעברית. וזו עוד סיבה למה הם בעייתיים
-
@אלף-שין כתב בבירור | עבודה נכונה עם GPT בתכנות:
@aiib
לא הבנתי פה הכל,
אבל למה שלא תשתמשו פה כולכם ב"מגרש המשחקים של גורק"?למי שלא מכיר, מדובר על זה: https://console.groq.com/playground
@אלף-שין כתב בבירור | עבודה נכונה עם GPT בתכנות:
אין לי מושג מה שמעת ומה שאלת ואת מי וגם זה לא רוולנטי,
פשוט תתחיל לעבוד עם המודלים האלה, הם מהחזקים ביותר,
הגיוון שלהם אמור לספק לך מענה מושלם,
לא חושב שיש מישהוא מקצועי שיגיד לך שזה לא מספיק....מודל r1 המופיע שם הוא לא המודל המלא, אלא מודל קטן יותר. הוא אמנם מצוין, אבל הרבה פחות מהמודל המלא. והוא בודאי לא טוב בקידוד יותר מהמודלים העדכניים של ג'מיני, וגם לא מ-gpt4o
בקיצור, ממש לא מדובר על המודלים החזקים ביותר שיש. חלקם די מיושנים, וגם האחרים לא מרשימים במיוחד ביחס להתפתחות המהירה בתחום
זה מסביר גם למה הם לא טובים בעברית... -
@NH-LOCAL כתב בבירור | עבודה נכונה עם GPT בתכנות:
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
אני מתחיל בתחום...
כרגע אני שואל שאלה בGPT מעתיק את הקוד עובר לVS CODE נכנס לקובץ ומדביק
וכמובן בהתחלה בונה את המבנה קובץ קובץ לפי הוראות של GPT (אני לא עושה כלום לבד... הכל GPT- לא מבין בתכנות...)
האם זאת הדרך הנכונה או שיש דרך יותר יעילה מאשר כל פעם לשנות את הקבצים להעתיק ולהדביק וכו'?תודה
לדעתי, שימוש בתוכנות כמו cline וכדומה פחות מתאים למשתמש מתחיל שבונה את כל הקוד מאפס.
הרבה יותר פשוט להעתיק קוד מלא ממשק צ'אט GPT, או Gemini ב-AI Studio. זה בדרך כלל עובד יותר חלק ויוצר פחות באגיםמכיוון שלמודלי החשיבה העדכניים (o3 mini, gemini flash thinking, deepseek r1) יש מגבלת פלט מאוד גבוהה, אפשר ומומלץ לבקש מהם בכל פעם לתת את הקוד המעודכן במלואו, במקום לעדכן רק שורה או קטע ספציפי
הנקודה היא שזה פחות נוח כל פעם להעתיק ולהדביק בתוך הקובץ וכו' היה מאד נחמד אם הוא היה משולב בתוך עורך הקוד ועושה את זה בעצמו. זה גם היה עוזר למנוע שימוש ייתר בקרדטים כי הוא היה משלב קטעי קוד בודדים.
-
@NH-LOCAL כתב בבירור | עבודה נכונה עם GPT בתכנות:
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
@אלף-שין כתב בבירור | עבודה נכונה עם GPT בתכנות:
ברור, זה כלל גדול בכל הדברים האלו, בשביל זה יש טרנסלייט...
בטוח שהכלל הזה עדיין נכון?
הרי היום אתה רואה שלמרות שאתה כותב בעברית הוא 'חושב' באנגלית אז מה זה משנה?אתה צודק. אין כמעט משמעות לשפה היום במודלים מתקדמים. יתכן שספציפית במודל r1 זה כן משנה, כי היכולת השפתית שלו קצת פחות טובה
@אלף-שין אשמח לסיעור מוחין בעניין...
-
@aiib כתב בבירור | עבודה נכונה עם GPT בתכנות:
הנקודה היא שזה פחות נוח כל פעם להעתיק ולהדביק בתוך הקובץ וכו' היה מאד נחמד אם הוא היה משולב בתוך עורך הקוד ועושה את זה בעצמו. זה גם היה עוזר למנוע שימוש ייתר בקרדטים כי הוא היה משלב קטעי קוד בודדים.
זה אכן חסכוני יותר, אבל זה מתכון לצרות. כשהמודל לא מבצע עדכון מלא של הקוד, זה גורם לבעיות, ביחוד כשקטעים מסויימים קשורים לוגית לקטעים אחרים
בפועל, אם תשתמש ב-AI Studio, חיסכון בקרדיטים לא אמור להוות שיקול בשבילך, כי זה חינם בלי הגבלה