Building a Project End-to-End Using AI
-
Go to app.gibsonai.com
-
Chat with GibsonAI and create a new project.
-
Once complete, GibsonAI will email you the API key.
-
Configure the API key:
gibson conf api::key [API key]
-
Import your project:
gibson import api
✨ Magic, right?
Integrating a Model into Your Code
GibsonAI creates base-level SQLAlchemy models. To integrate them just do this:
from my_project.gibsonai.model.Module import ModuleBase
class MyModule(ModuleBase):
pass
When you need to add custom business logic to the model, just modify your version of the model:
from my_project.gibsonai.model.Module import ModuleBase
class MyModule(ModuleBase):
def my_custom_business_logic(self):
return 1 + 1
We strongly suggest you do not refer to the base level SQLAlchemy models directly. By sub-classing you won't have to refactor your code if you decide to add custom code.
Integrating a Schema into Your Code
Currently, refer to the base-level schema directly.
Migrating Your Software from PHP to Python
-
Configure your datastore:
gibson conf datastore::uri mysql+pymysql://[user]:[password]@[host]/[database name]
-
Turn on Dev Mode:
gibson dev on
-
Import your MySQL schema:
gibson import mysql
Well done! 70% of your code is written automatically. Customize the rest!
Asking GibsonAI Questions With Context
Use natural language queries:
gibson q [natural language request]
You can reference:
- Files:
file://[full path]
- Python modules:
py://[import]
- SQL entities:
sql://[entity name]
Examples
gibson q format file:///Users/me/file.py for PEP8
gibson q code review py://user.modules.User
gibson q add nickname to sql://user
Using sql://
enables GibsonAI to:
- Create new entities
- Store them in
last
memory - Let you generate models/schemas instantly
gibson code model user
Need help?
Join our Discord Server to ask questions or see what others are doing with GibsonAI.