diff --git a/apps/portal/src/app/nebula/plugins/openAI/page.mdx b/apps/portal/src/app/nebula/plugins/openAI/page.mdx new file mode 100644 index 00000000000..e3df8ab6ae6 --- /dev/null +++ b/apps/portal/src/app/nebula/plugins/openAI/page.mdx @@ -0,0 +1,40 @@ +# OpenAI + +### Chat Completions API + +Compatible with OpenAI’s Chat Completion API to process chat history and generate context-aware responses. + +```python +from openai import OpenAI + +client = OpenAI( + base_url="https://nebula-api.thirdweb.com", + api_key="{{THIRDWEB_SECRET_KEY}}", +) +chat_completion = client.chat.completions.create( + model="t0", + messages=[{"role": "user", "content": "Hello Nebula!"}], + stream=False, + extra_body={ "context": { "wallet_address": "0x..." }} +) + +print(chat_completion) +``` + +### Models API + +Compatible with OpenAI’s Models API to list out models used. + +```python +from openai import OpenAI + +# https://nebula-api.thirdweb.com/models + +client = OpenAI( + base_url="https://nebula-api.thirdweb.com/", + api_key="", +) + +models = client.models.list() +print(models) +``` \ No newline at end of file diff --git a/apps/portal/src/app/nebula/plugins/page.mdx b/apps/portal/src/app/nebula/plugins/page.mdx index b24e771a43d..1a95ec2d7b1 100644 --- a/apps/portal/src/app/nebula/plugins/page.mdx +++ b/apps/portal/src/app/nebula/plugins/page.mdx @@ -2,11 +2,7 @@ import { Callout } from '@doc' # Plugins +- [OpenAI](/nebula/plugins/openai) +- [Eliza](/nebula/plugins/eliza) - - -We are actively developing plugins to develop with other frameworks and languages. - -If you have a specific request, please [contact us](https://thirdweb.com/contact). - - \ No newline at end of file +We are actively adding more integrations, for any specific requests please [contact us](https://thirdweb.com/contact). \ No newline at end of file diff --git a/apps/portal/src/app/nebula/sidebar.tsx b/apps/portal/src/app/nebula/sidebar.tsx index 1edb18d2bcd..9ede09d6026 100644 --- a/apps/portal/src/app/nebula/sidebar.tsx +++ b/apps/portal/src/app/nebula/sidebar.tsx @@ -110,10 +110,14 @@ export const sidebar: SideBar = { ], }, { - name: "Plugins", + name: "Plugins & Integrations", href: "/nebula/plugins", icon: , links: [ + { + name: "OpenAI", + href: "/nebula/plugins/openai", + }, { name: "Eliza", href: "/nebula/plugins/eliza",