obi-sdk 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -76,48 +76,6 @@ You can also include the loader directly from our CDN:
76
76
  <script src="https://unpkg.com/obi-sdk@latest/dist/obi-loader.iife.js"></script>
77
77
  ```
78
78
 
79
- ### Installation for npm Projects
80
-
81
- You can also install the SDK via npm:
82
-
83
- ```bash
84
- npm install obi-sdk
85
- ```
86
-
87
- ## Always Load the Latest SDK Version
88
-
89
- The SDK includes a simple function to always load the latest version from the CDN, which can be useful for applications that need to ensure users always have the newest features:
90
-
91
- ```tsx
92
- import { initObi } from "obi-sdk"
93
-
94
- // In a React component:
95
- useEffect(() => {
96
- const setupObi = async () => {
97
- try {
98
- // This will:
99
- // 1. Check npm registry for the latest version
100
- // 2. Load that specific version from unpkg.com
101
- // 3. Initialize the widget with your config
102
- await initObi({
103
- apiKey: "YOUR_API_KEY",
104
- position: "bottom-right",
105
- user: {
106
- id: "user-123",
107
- email: "user@example.com",
108
- },
109
- })
110
- console.log("Obi Assistant initialized with latest SDK")
111
- } catch (error) {
112
- console.error("Failed to initialize Obi Assistant:", error)
113
- }
114
- }
115
-
116
- // Initialize Obi
117
- setupObi()
118
- }, [])
119
- ```
120
-
121
79
  ## Widget Positioning
122
80
 
123
81
  The widget can be positioned in one of four corners of the page:
@@ -129,29 +87,6 @@ window.obiWidgetConfig = {
129
87
  }
130
88
  ```
131
89
 
132
- ### Theming
133
-
134
- The widget supports light and dark themes:
135
-
136
- ```js
137
- window.obiWidgetConfig = {
138
- theme: "light", // Options: "light", "dark"
139
- apiKey: "YOUR_API_KEY",
140
- }
141
- ```
142
-
143
- ### SDK Version Control
144
-
145
- You can specify which version of the SDK to load:
146
-
147
- ```js
148
- window.obiWidgetConfig = {
149
- sdkVersion: "latest", // Use "latest" or a specific version number
150
- noCacheSDK: false, // Set to true to bypass cache
151
- apiKey: "YOUR_API_KEY",
152
- }
153
- ```
154
-
155
90
  ## License
156
91
 
157
92
  SEE LICENSE IN LICENSE.txt