...
This commit is contained in:
		
							
								
								
									
										14
									
								
								herodb/aiprompts/rhaiwrapping.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								herodb/aiprompts/rhaiwrapping.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| in @src/zaz/rhai  | ||||
| make wrappers for the src/zaz/models and see how to use them from src/zaz/cmd/examples.rs | ||||
|  | ||||
| how to do this you can find in rhaibook/rust | ||||
|  | ||||
| the wrappers need to be simple and return the result and if an error return a proper error into the rhai environment so the rhai script using the wrappers will get appropriate error | ||||
|  | ||||
| all wrapped functions need to be registered into the rhai engine | ||||
|  | ||||
| keep all code as small as possible | ||||
|  | ||||
| the creation of the db should not be done in the rhai script, | ||||
| this shouldd be done before we call the rhai script | ||||
| a db is context outside of the script execution | ||||
		Reference in New Issue
	
	Block a user