File tree Expand file tree Collapse file tree 3 files changed +46
-8
lines changed
apps/portal/src/app/nebula Expand file tree Collapse file tree 3 files changed +46
-8
lines changed Original file line number Diff line number Diff line change 1+ ** Chat Completions API**
2+ Compatible with OpenAI’s Chat Completion API to process chat history and generate context-aware responses.
3+
4+ ``` python
5+ from openai import OpenAI
6+
7+ client = OpenAI(
8+ base_url = " <https://nebula-api.thirdweb.com/>" ,
9+ api_key = " {{ THIRDWEB_SECRET_KEY}} " ,
10+ )
11+
12+ chat_completion = client.chat.completions.create(
13+ model = " t0" ,
14+ messages = [{" role" : " user" , " content" : " Hello Nebula!" }],
15+ stream = False ,
16+ extra_body = { " context" : { " wallet_address" : " 0x..." }}
17+ )
18+
19+ print (chat_completion)
20+ ```
21+
22+ ** Models API**
23+
24+ Compatible with OpenAI’s Models API to list out models used.
25+
26+ ``` python
27+ from openai import OpenAI
28+
29+ # https://nebula-api.thirdweb.com/models
30+
31+ client = OpenAI(
32+ base_url = " https://nebula-api.thirdweb.com/" ,
33+ api_key = " " ,
34+ )
35+
36+ models = client.models.list()
37+ print (models)
38+ ```
Original file line number Diff line number Diff line change @@ -2,11 +2,7 @@ import { Callout } from '@doc'
22
33# Plugins
44
5+ - [ OpenAI] ( /nebula/plugins/openai )
6+ - [ Eliza] ( /nebula/plugins/eliza )
57
6- <Callout variant = ' info' title = ' Coming Soon' >
7-
8- We are actively developing plugins to develop with other frameworks and languages.
9-
10- If you have a specific request, please [ contact us] ( https://thirdweb.com/contact ) .
11-
12- </Callout >
8+ We are actively adding more integrations, for any specific requests please [ contact us] ( https://thirdweb.com/contact ) .
Original file line number Diff line number Diff line change @@ -110,10 +110,14 @@ export const sidebar: SideBar = {
110110 ] ,
111111 } ,
112112 {
113- name : "Plugins" ,
113+ name : "Plugins & Integrations " ,
114114 href : "/nebula/plugins" ,
115115 icon : < Blocks /> ,
116116 links : [
117+ {
118+ name : "OpenAI" ,
119+ href : "/nebula/plugins/openai" ,
120+ } ,
117121 {
118122 name : "Eliza" ,
119123 href : "/nebula/plugins/eliza" ,
You can’t perform that action at this time.
0 commit comments