Skip to content

Commit

Permalink
More renames
Browse files Browse the repository at this point in the history
  • Loading branch information
1st1 committed Feb 15, 2025
1 parent 8981b7c commit 399f6b2
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 68 deletions.
2 changes: 1 addition & 1 deletion docs/cloud/web.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Web GUI
:edb-alt-title: Using Gel Cloud via the web GUI

If you'd prefer, you can also manage your account via `the |Gel| Cloud
web-based GUI <https://cloud.edgedb.com/>`_.
web-based GUI <https://cloud.geldata.com/>`_.

The first time you access the web UI, you will be prompted to log in. Once you
log in with your account, you'll be on the "Instances" tab of the front page
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/datamigrations/postgres.rst
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Copying the data

Now that we have a schema, we can use :ref:`ref_cli_gel_project_init` to
set up our new Gel database. A new schema migration is added via
:ref:`ref_cli_gel_migration_create` and then :ref:`edgedb migrate
:ref:`ref_cli_gel_migration_create` and then :ref:`gel migrate
<ref_cli_gel_migration_apply>` applies the schema changes to the database.
After the schema migration, we'll still need to copy the existing data from
Postgres. JSON is a pretty good intermediate format for this operation. Gel
Expand Down
3 changes: 1 addition & 2 deletions docs/guides/deployment/fly_io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ Let's construct the DSN (AKA "connection string") for our instance. DSNs have
the following format: :geluri:`<username>:<password>@<hostname>:<port>`. We
can construct the DSN with the following components:

- ``<username>``: the default value — |admin| (the default used to be
``edgedb`` for |EdgeDB| <= 5)
- ``<username>``: the default value — |admin|
- ``<password>``: the value we assigned to ``$PASSWORD``
- ``<hostname>``: the name of your Gel app (stored in the
``$EDB_APP`` environment variable) suffixed with ``.internal``. Fly uses this
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/deployment/gcp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ the secrets we declared in the previous step.
.. code-block:: bash
$ wget "https://raw.githubusercontent.com\
/edgedb/edgedb-deploy/dev/gcp/deployment.yaml"
/geldata/gel-deploy/dev/gcp/deployment.yaml"
$ kubectl apply -f deployment.yaml
Expand Down
18 changes: 9 additions & 9 deletions docs/guides/deployment/heroku.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ add-on as the backend.
Because of Heroku's architecture Gel must be deployed with a web app on
Heroku. For this guide we will use a `todo app written in Node <todo-repo_>`_.

.. _todo-repo: https://github.com/edgedb/simpletodo/tree/main
.. _todo-repo: https://github.com/geldata/simpletodo/tree/main


Prerequisites
Expand All @@ -36,7 +36,7 @@ First copy the code, initialize a new git repo, and create a new heroku app.

.. code-block:: bash
$ npx degit 'edgedb/simpletodo#main' simpletodo-heroku
$ npx degit 'geldata/simpletodo#main' simpletodo-heroku
$ cd simpletodo-heroku
$ git init --initial-branch main
$ heroku apps:create --buildpack heroku/nodejs
Expand Down Expand Up @@ -80,27 +80,27 @@ Add the Gel Buildpack

To run Gel on Heroku we'll add the `Gel buildpack <buildpack_>`_.

.. _buildpack: https://github.com/edgedb/heroku-buildpack-edgedb
.. _buildpack: https://github.com/geldata/heroku-buildpack-gel

.. code-block:: bash
$ heroku buildpacks:add \
--index 1 \
https://github.com/edgedb/heroku-buildpack-edgedb.git
https://github.com/geldata/heroku-buildpack-gel.git
Use ``start-edgedb`` in the Procfile
====================================
Use ``start-gel`` in the Procfile
=================================

To make Gel available to a process prepend the command with ``start-edgedb``
To make Gel available to a process prepend the command with ``start-gel``
which is provided by the Gel buildpack. For the sample application in this
guide, the web process is started with the command ``npm start``. If you have
other processes in your application besides/instead of web that need to access
|Gel| those process commands should be prepended with ``start-edgedb`` too.
|Gel| those process commands should be prepended with ``start-gel`` too.

.. code-block:: bash
$ echo "web: start-edgedb npm start" > Procfile
$ echo "web: start-gel npm start" > Procfile
Deploy the App
Expand Down
1 change: 0 additions & 1 deletion docs/guides/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ guide!
auth/index
migrations/index
contributing/index
Cheatsheets <https://docs.edgedb.com/database/cheatsheets>
14 changes: 7 additions & 7 deletions docs/guides/migrations/guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ info to keep in mind before committing to the operation:
2. Ensure that other users of the database have the revision
above or can create database from scratch.
To check a specific instance, run:
edgedb -I <name> migration log --from-db --newest-first --limit 1
gel -I <name> migration log --from-db --newest-first --limit 1
1. Merge version control branches that contain schema changes
if possible.
Expand Down Expand Up @@ -743,7 +743,7 @@ the same as with our previous squash:
2. Ensure that other users of the database have the revision
above or can create database from scratch.
To check a specific instance, run:
edgedb -I <name> migration log --from-db --newest-first --limit 1
gel -I <name> migration log --from-db --newest-first --limit 1
3. Merge version control branches that contain schema changes
if possible.
Expand Down Expand Up @@ -786,7 +786,7 @@ working with git after doing a squash with a fixup.
git add dbschema
The normal migration process will update your migration history:
edgedb migrate
gel migrate
We'll take its suggestion to apply the migration:
Expand Down Expand Up @@ -817,7 +817,7 @@ command itself will show the following input when the process starts up:
Connecting to Gel instance 'anything' at localhost:10700...
Gel Watch initialized.
Hint: Use `edgedb migration create` and `edgedb migrate --dev-mode`
Hint: Use `gel migration create` and `gel migrate --dev-mode`
to apply changes once done.
Monitoring "/home/instancename".
Expand Down Expand Up @@ -987,7 +987,7 @@ will not work:
│ ^^^^^^^^^^^^^^^^^^ Use the migration commands instead.
= The `allow_bare_ddl` configuration variable is set to
'NeverAllow'. The `edgedb migrate` command normally sets
'NeverAllow'. The `gel migrate` command normally sets
this to avoid accidental schema changes outside of the
migration flow.
Expand Down Expand Up @@ -1059,7 +1059,7 @@ you try to apply the change:
Error executing command: Database must be updated to
the last migration on the filesystem for
`migration create`. Run:
edgedb migrate
gel migrate
db> \migrate
Error executing command: database applied migration
Expand Down Expand Up @@ -1397,4 +1397,4 @@ did above in the "So you really wanted to use DDL but now regret it?"
section.
.. _rfc: https://github.com/geldata/rfcs/blob/master/text/1000-migrations.rst
.. _tutorial_files: https://github.com/edgedb/website/tree/main/content/tutorial/dbschema/migrations
.. _tutorial_files: https://github.com/geldata/website/tree/main/content/tutorial/dbschema/migrations
69 changes: 23 additions & 46 deletions docs/guides/tutorials/chatgpt_bot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ related to the Gel docs.*
.. lint-off
.. _our blog post about why and how we use ChatGPT via embeddings:
https://www.edgedb.com/blog/chit-chatting-with-edgedb-docs-via-chatgpt-and-pgvector
https://www.geldata.com/blog/chit-chatting-with-edgedb-docs-via-chatgpt-and-pgvector

.. lint-on
Expand Down Expand Up @@ -185,31 +185,7 @@ will make it easier to import them.
.. lint-on
Now, we'll create an instance of Gel for our project, but first, we need to
install Gel!


Install the Gel CLI
-------------------

*If you already have Gel installed, you can skip to creating an instance.*

Before we can create an instance for our project, we need to install the Gel
CLI. On Linux or MacOS, run the following in your terminal and follow the
on-screen instructions:

.. code-block:: bash
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh
Windows Powershell users can use this command:

.. code-block:: powershell
PS> iwr https://ps1.edgedb.com -useb | iex
For other installation scenarios, see the "Additional installation methods"
section of `our "Install" page <https://www.edgedb.com/install>`_.
Now, we'll create an instance of Gel for our project.


Create a local Gel instance
Expand All @@ -220,7 +196,7 @@ the following in the root of the project:

.. code-block:: bash
$ gel project init
$ npx gel project init
No `gel.toml` found in `/<path>/<to>/<project>/docs-chatbot`
or above
Expand Down Expand Up @@ -264,13 +240,13 @@ We're going to add a couple of variables to that file to configure the Gel
client. We'll need to run a command on our new instance to get the value for
one of those. Since we'll be using the `Edge runtime
<https://nextjs.org/docs/app/api-reference/edge>`_ in our Next.js project, the
edgedb-js client won't be able to access the Node.js filesystem APIs it usually
gel-js client won't be able to access the Node.js filesystem APIs it usually
uses to automatically find your instance, so we need to provide the DSN for the
instance instead. To get that, run this command:

.. code-block:: bash
$ gel instance credentials --insecure-dsn
$ npx gel instance credentials --insecure-dsn
Copy what it logs out. Open the ``.env.local`` file in your text editor and add
this to it:
Expand Down Expand Up @@ -546,8 +522,8 @@ We apply this schema by creating and running a migration.
.. code-block:: bash
$ gel migration create
$ gel migrate
$ npx gel migration create
$ npx gel migrate
.. note::
Expand Down Expand Up @@ -593,7 +569,7 @@ libraries that will help us.
.. code-block:: bash
$ npm install openai edgedb
$ npm install openai gel
$ npm install \
@gel/generate \
gpt-tokenizer \
Expand Down Expand Up @@ -642,7 +618,7 @@ tasks we need to perform.
import { join } from "path";
import dotenv from "dotenv";
import { encode } from "gpt-tokenizer";
import * as edgedb from "edgedb";
import * as gel from "gel";
import e from "dbschema/edgeql-js";
import { initOpenAIClient } from "./utils";
Expand Down Expand Up @@ -917,7 +893,7 @@ Again, we'll break the ``storeEmbeddings`` function apart and walk through it.
//
async function storeEmbeddings() {
const client = edgedb.createClient();
const client = gel.createClient();
const sectionPaths = await walk("docs");
Expand Down Expand Up @@ -976,7 +952,7 @@ Here's what the whole function looks like:
//
async function storeEmbeddings() {
const client = edgedb.createClient();
const client = gel.createClient();
const sectionPaths = await walk("docs");
Expand Down Expand Up @@ -1017,7 +993,7 @@ into your ``generate-embeddings.ts`` file.
import { join } from "path";
import dotenv from "dotenv";
import { encode } from "gpt-tokenizer";
import * as edgedb from "edgedb";
import * as gel from "gel";
import e from "dbschema/edgeql-js";
import { initOpenAIClient } from "@/utils";
Expand Down Expand Up @@ -1079,7 +1055,7 @@ into your ``generate-embeddings.ts`` file.
}
async function storeEmbeddings() {
const client = edgedb.createClient();
const client = gel.createClient();
const sectionPaths = await walk("docs");
Expand Down Expand Up @@ -1116,6 +1092,7 @@ Running the script
Let's add a script to ``package.json`` that will invoke and execute
``generate-embeddings.ts``.
.. XXX gel version - fix
.. code-block:: json-diff
{
Expand All @@ -1131,7 +1108,7 @@ Let's add a script to ``package.json`` that will invoke and execute
+ "embeddings": "tsx generate-embeddings.ts"
},
"dependencies": {
"edgedb": "^1.3.5",
"gel": "^1.3.5",
"next": "^13.4.19",
"openai": "^4.0.1",
"react": "18.2.0",
Expand Down Expand Up @@ -1165,7 +1142,7 @@ After the script finishes, open the Gel UI.
.. code-block:: bash
$ gel ui
$ npx gel ui
Open your "main" branch and switch to the Data Explorer tab. You should see
that the database has been updated with the embeddings and other relevant data.
Expand Down Expand Up @@ -1260,7 +1237,7 @@ writing some configuration.
:caption: app/api/generate-answer/route.ts
import { stripIndents, oneLineTrim } from "common-tags";
import * as edgedb from "edgedb";
import * as gel from "gel";
import e from "dbschema/edgeql-js";
import { errors } from "../../constants";
import { initOpenAIClient } from "@/utils";
Expand All @@ -1269,7 +1246,7 @@ writing some configuration.
const openai = initOpenAIClient();
const client = edgedb.createHttpClient();
const client = gel.createHttpClient();
export async function POST(req: Request) {
//
Expand Down Expand Up @@ -1664,7 +1641,7 @@ Now, let's take a look at the whole thing. Copy and paste this into your
:caption: app/api/generate-answer/route.ts
import { stripIndents, oneLineTrim } from "common-tags";
import * as edgedb from "edgedb";
import * as gel from "gel";
import e from "dbschema/edgeql-js";
import { errors } from "../../constants";
import { initOpenAIClient } from "@/utils";
Expand All @@ -1673,7 +1650,7 @@ Now, let's take a look at the whole thing. Copy and paste this into your
const openai = initOpenAIClient();
const client = edgedb.createHttpClient();
const client = gel.createHttpClient();
export async function POST(req: Request) {
try {
Expand Down Expand Up @@ -2296,11 +2273,11 @@ try tweaking:
You can see the finished source code for this build in `our examples repo on
GitHub <https://github.com/geldata/gel-examples/tree/main/docs-chatbot>`_.
You might also find our actual implementation interesting. You'll find it in
`our website repo <https://github.com/edgedb/website>`_. Pay close attention to
`our website repo <https://github.com/geldata/website>`_. Pay close attention to
the contents of `buildTools/gpt
<https://github.com/edgedb/website/tree/main/buildTools/gpt>`_, where the
<https://github.com/geldata/website/tree/main/buildTools/gpt>`_, where the
embedding generation happens and `components/gpt
<https://github.com/edgedb/website/tree/main/components/gpt>`_, which contains
<https://github.com/geldata/website/tree/main/components/gpt>`_, which contains
most of the UI for our chatbot.
If you have trouble with the build or just want to hang out with other Gel
Expand Down

0 comments on commit 399f6b2

Please sign in to comment.