File tree Expand file tree Collapse file tree 3 files changed +48
-8
lines changed
apps/portal/src/app/nebula Expand file tree Collapse file tree 3 files changed +48
-8
lines changed Original file line number Diff line number Diff line change 1+ # OpenAI
2+
3+ ### Chat Completions API
4+
5+ Compatible with OpenAI’s Chat Completion API to process chat history and generate context-aware responses.
6+
7+ ``` python
8+ from openai import OpenAI
9+
10+ client = OpenAI(
11+ base_url = " https://nebula-api.thirdweb.com" ,
12+ api_key = " {{ THIRDWEB_SECRET_KEY}} " ,
13+ )
14+ chat_completion = client.chat.completions.create(
15+ model = " t0" ,
16+ messages = [{" role" : " user" , " content" : " Hello Nebula!" }],
17+ stream = False ,
18+ extra_body = { " context" : { " wallet_address" : " 0x..." }}
19+ )
20+
21+ print (chat_completion)
22+ ```
23+
24+ ### Models API
25+
26+ Compatible with OpenAI’s Models API to list out models used.
27+
28+ ``` python
29+ from openai import OpenAI
30+
31+ # https://nebula-api.thirdweb.com/models
32+
33+ client = OpenAI(
34+ base_url = " https://nebula-api.thirdweb.com/" ,
35+ api_key = " " ,
36+ )
37+
38+ models = client.models.list()
39+ print (models)
40+ ```
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