The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
Python agentic-memoryagentic-memory-systemagentsaiai-agentschatgptgenaillmlong-term-memorymemorymemory-managementpythonragstate-management
Beautify JSON docs (#906)
Deven Patel54287653298e
diff --git a/docs/data-sources/json.mdx b/docs/data-sources/json.mdxindex 5f2430706..d4821638b 100644--- a/docs/data-sources/json.mdx+++ b/docs/data-sources/json.mdx@@ -12,7 +12,7 @@ Here are the supported sources for loading `json`:```If you would like to add other data structures (e.x. list, dict etc.), do:-```+```pythonimport jsona = {"foo": "bar"}valid_json_string_data = json.dumps(a, indent=0)@@ -21,7 +21,7 @@ If you would like to add other data structures (e.x. list, dict etc.), do:valid_json_string_data = json.dumps(b, indent=0)```Example:-```+```pythonimport osfrom embedchain.apps.app import App@@ -43,7 +43,7 @@ print(response)"As of October 2023, Elon Musk's net worth is $255.2 billion."```temp.json-```+```json{"question": "What is your net worth, Elon Musk?","answer": "As of October 2023, Elon Musk's net worth is $255.2 billion, making him one of the wealthiest individuals in the world."diff --git a/examples/rest-api/main.py b/examples/rest-api/main.pyindex 70bb87fba..9b2341044 100644--- a/examples/rest-api/main.py+++ b/examples/rest-api/main.py@@ -1,19 +1,16 @@-import osimport logging+import os+import yaml-from fastapi import FastAPI, UploadFile, Depends, HTTPException+from database import Base, SessionLocal, engine+from fastapi import Depends, FastAPI, HTTPException, UploadFile+from models import DefaultResponse, DeployAppRequest, QueryApp, SourceApp+from services import get_app, get_apps, remove_app, save_appfrom sqlalchemy.orm import Session+from utils import generate_error_message_for_api_keys+from embedchain import Pipeline as Appfrom embedchain.client import Client-from models import (- QueryApp,- SourceApp,- DefaultResponse,- DeployAppRequest,-)-from database import Base, engine, SessionLocal-from services import get_app, save_app, get_apps, remove_app-from utils import generate_error_message_for_api_keysBase.metadata.create_all(bind=engine)diff --git a/examples/rest-api/models.py b/examples/rest-api/models.pyindex 7a359852d..1aecf00aa 100644--- a/examples/rest-api/models.py+++ b/examples/rest-api/models.py@@ -1,7 +1,8 @@from typing import Optional-from pydantic import BaseModel, Field-from sqlalchemy import Column, String, Integer+from database import Base+from pydantic import BaseModel, Field+from sqlalchemy import Column, Integer, Stringclass QueryApp(BaseModel):diff --git a/examples/rest-api/services.py b/examples/rest-api/services.pyindex af2c984b0..c200454b8 100644--- a/examples/rest-api/services.py+++ b/examples/rest-api/services.py@@ -1,6 +1,5 @@-from sqlalchemy.orm import Session-from models import AppModel+from sqlalchemy.orm import Sessiondef get_app(db: Session, app_id: str):