1- from pydantic import BaseModel , Field
1+ from pydantic import BaseModel , Field , ConfigDict
22from typing import List , Optional
33from datetime import datetime
44
@@ -63,67 +63,66 @@ class WeaviateUserProfile(BaseModel):
6363 last_updated : datetime = Field (default_factory = datetime .now ,
6464 description = "The date and time the profile was last updated." )
6565
66- class Config :
67- """
68- Pydantic model configuration.
69- """
70- orm_mode = True
71- schema_extra = {
72- "example" : {
73- "user_id" : "a1b2c3d4-e5f6-7890-1234-567890abcdef" ,
74- "github_username" : "jane-dev" ,
75- "display_name" : "Jane Developer" ,
76- "bio" : "Creator of innovative open-source tools. Full-stack developer with a passion for Rust and WebAssembly." ,
77- "location" : "Berlin, Germany" ,
78- "repositories" : [
79- {
80- "name" : "rust-web-framework" ,
81- "description" : "A high-performance web framework for Rust." ,
82- "languages" : ["Rust" , "TOML" ],
83- "topics" : ["rust" , "webdev" , "performance" , "framework" ],
84- "stars" : 2500 ,
85- "forks" : 400
86- },
87- {
88- "name" : "data-viz-lib" ,
89- "description" : "A declarative data visualization library for JavaScript." ,
90- "languages" : ["JavaScript" , "TypeScript" ],
91- "topics" : ["data-visualization" , "d3" , "charts" ],
92- "stars" : 1200 ,
93- "forks" : 150
94- }
95- ],
96- "pull_requests" : [
97- {
98- "title" : "Add async support for database connections" ,
99- "body" : "This PR adds comprehensive async support for database connections, improving performance by 40%..." ,
100- "state" : "closed" ,
101- "repository" : "microsoft/vscode" ,
102- "created_at" : "2024-01-15T10:30:00Z" ,
103- "closed_at" : "2024-01-20T14:20:00Z" ,
104- "merged_at" : "2024-01-20T14:20:00Z" ,
105- "labels" : ["enhancement" , "database" , "performance" ],
106- "url" : "https://github.com/microsoft/vscode/pull/12345" ,
107- },
108- {
109- "title" : "Fix memory leak in WebAssembly module" ,
110- "body" : "Fixes a critical memory leak that was causing crashes in production environments..." ,
111- "state" : "open" ,
112- "repository" : "facebook/react" ,
113- "created_at" : "2024-02-01T09:15:00Z" ,
114- "closed_at" : None ,
115- "merged_at" : None ,
116- "labels" : ["bug" , "wasm" , "critical" ],
117- "url" : "https://github.com/facebook/react/pull/67890" ,
118- }
119- ],
120- "languages" : ["Rust" , "JavaScript" , "TypeScript" , "TOML" ],
121- "topics" : ["rust" , "webdev" , "performance" , "framework" , "data-visualization" , "d3" , "charts" ],
122- "followers_count" : 1800 ,
123- "following_count" : 250 ,
124- "total_stars_received" : 3700 ,
125- "total_forks" : 550 ,
126- "profile_text_for_embedding" : "Jane Developer, Creator of innovative open-source tools. Full-stack developer with a passion for Rust and WebAssembly. Repositories: rust-web-framework, A high-performance web framework for Rust. data-viz-lib, A declarative data visualization library for JavaScript. Languages: Rust, JavaScript, TypeScript. Topics: rust, webdev, performance, data-visualization." ,
127- "last_updated" : "2025-06-23T12:21:00Z"
128- }
66+ model_config = ConfigDict (
67+ from_attributes = True ,
68+ json_schema_extra = {
69+ "example" : {
70+ "user_id" : "a1b2c3d4-e5f6-7890-1234-567890abcdef" ,
71+ "github_username" : "jane-dev" ,
72+ "display_name" : "Jane Developer" ,
73+ "bio" : "Creator of innovative open-source tools. Full-stack developer with a passion for Rust and WebAssembly." ,
74+ "location" : "Berlin, Germany" ,
75+ "repositories" : [
76+ {
77+ "name" : "rust-web-framework" ,
78+ "description" : "A high-performance web framework for Rust." ,
79+ "languages" : ["Rust" , "TOML" ],
80+ "topics" : ["rust" , "webdev" , "performance" , "framework" ],
81+ "stars" : 2500 ,
82+ "forks" : 400
83+ },
84+ {
85+ "name" : "data-viz-lib" ,
86+ "description" : "A declarative data visualization library for JavaScript." ,
87+ "languages" : ["JavaScript" , "TypeScript" ],
88+ "topics" : ["data-visualization" , "d3" , "charts" ],
89+ "stars" : 1200 ,
90+ "forks" : 150
91+ }
92+ ],
93+ "pull_requests" : [
94+ {
95+ "title" : "Add async support for database connections" ,
96+ "body" : "This PR adds comprehensive async support for database connections, improving performance by 40%..." ,
97+ "state" : "closed" ,
98+ "repository" : "microsoft/vscode" ,
99+ "created_at" : "2024-01-15T10:30:00Z" ,
100+ "closed_at" : "2024-01-20T14:20:00Z" ,
101+ "merged_at" : "2024-01-20T14:20:00Z" ,
102+ "labels" : ["enhancement" , "database" , "performance" ],
103+ "url" : "https://github.com/microsoft/vscode/pull/12345" ,
104+ },
105+ {
106+ "title" : "Fix memory leak in WebAssembly module" ,
107+ "body" : "Fixes a critical memory leak that was causing crashes in production environments..." ,
108+ "state" : "open" ,
109+ "repository" : "facebook/react" ,
110+ "created_at" : "2024-02-01T09:15:00Z" ,
111+ "closed_at" : None ,
112+ "merged_at" : None ,
113+ "labels" : ["bug" , "wasm" , "critical" ],
114+ "url" : "https://github.com/facebook/react/pull/67890" ,
115+ }
116+ ],
117+ "languages" : ["Rust" , "JavaScript" , "TypeScript" , "TOML" ],
118+ "topics" : ["rust" , "webdev" , "performance" , "framework" , "data-visualization" , "d3" , "charts" ],
119+ "followers_count" : 1800 ,
120+ "following_count" : 250 ,
121+ "total_stars_received" : 3700 ,
122+ "total_forks" : 550 ,
123+ "profile_text_for_embedding" : "Jane Developer, Creator of innovative open-source tools. Full-stack developer with a passion for Rust and WebAssembly. Repositories: rust-web-framework, A high-performance web framework for Rust. data-viz-lib, A declarative data visualization library for JavaScript. Languages: Rust, JavaScript, TypeScript. Topics: rust, webdev, performance, data-visualization." ,
124+ "last_updated" : "2025-06-23T12:21:00Z"
129125 }
126+ }
127+
128+ )
0 commit comments