-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
ASGI config for novel_api project. | ||
It exposes the ASGI callable as a module-level variable named ``application``. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ | ||
""" | ||
|
||
import os | ||
|
||
from django.core.asgi import get_asgi_application | ||
|
||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'novel_api.settings') | ||
|
||
application = get_asgi_application() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class ChatbotConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'chatbot' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import mongoengine | ||
|
||
|
||
class Memory(mongoengine.Document): | ||
novel = mongoengine.StringField(max_length=32) | ||
Memory = mongoengine.ListField() # 文章的memory | ||
|
||
|
||
class Access_token_pool(mongoengine.Document): | ||
access_token = mongoengine.StringField() | ||
now_time = mongoengine.StringField() | ||
|
||
|
||
class User(mongoengine.Document): | ||
id = mongoengine.StringField(max_length=100) | ||
|
||
class Paragraph(mongoengine.Document): | ||
text = mongoengine.ListField() | ||
|
||
|
||
class Choice(mongoengine.Document): | ||
text = mongoengine.ListField() |