@casual-simulation/crypto
Advanced tools
Changelog
V3.0.14
circle
bot form ignore lighting changes based on its orientation.formAddressAspectRatio
tag to allow adjusting how formAddress
images/videos are displayed on cube
, circle
, and sprite
bot forms.
os.joinRoom(roomName, options?)
os.leaveRoom(roomName, options?)
os.getRoomOptions(roomName)
os.setRoomOptions(roomName, options)
os.getRoomTrackOptions(roomName, trackAddress)
os.setRoomTrackOptions(roomName, trackAddress, options)
os.getRoomRemoteOptions(roomName, remoteId)
@onRoomJoined
- Sent whenever a room has been joined via os.joinRoom()
@onRoomLeave
- Sent whenever a room has been exited via os.leaveRoom()
@onRoomStreaming
- Sent whenever the local user has been connected or reconnected to a room.@onRoomStreamLost
- Sent whenever the local user has been disconnected from a room.@onRoomTrackSubscribed
- Sent whenever an audio/video track has been discovered inside a room.@onRoomTrackUnsubscribed
- Sent whenever an audio/video track has been removed from a room.@onRoomRemoteJoined
- Sent whenever a remote user has joined a room.@onRoomRemoteLeave
- Sent whenever a remote user has left a room.@onRoomSpeakersChanged
- Sent whenever the list of speaking users has changed in a room.@onRoomOptionsChanged
- Sent whenever the local room options have been changed.rooms-example
appBundle for an example.os.listInstUpdates()
and os.getInstStateFromUpdates(updates)
functions.
os.listInstUpdates()
gets the list of updates that have occurred in the current instance.os.getInstStateFromUpdates()
gets the bot state that is produced by the given list of updates.@onAnyAction
calls for bot updates.os.tip()
with long words could cause the words to overflow the tooltip background.Changelog
V3.0.0
Added the os.openImageClassifier(options)
and os.closeImageClassifier()
functions.
@onClick
tag and put the following code in it (replacing MY_MODEL_URL
with the shareable link):
await os.openImageClassifier({
modelUrl: 'MY_MODEL_URL',
});
options
is an object with the following properties:
modelUrl
- The sharable link that was generated from Teachable Machine.modelJsonUrl
- Is optional and can be used in advanced scenarios where you want to control where the model is stored.modelMetadataUrl
- Is optional and can be used in advanced scenarios where you want to control where the model is stored.cameraType
- Is optional and is the type of camera that should be preferred. Can be "front" or "rear".Created the oai-1
appBundle.
This appBundle is currently a simple ab that can query the OpenAI GPT-3 API via a shout.
The ab has the following features:
A single manager bot in the oai-1
dimension and systemPortal as oai-1.manager
.
@generateTextResponse
is a listener that asks GPT-3 to respond to a given text prompt.
It takes the following parameters:
apiKey
- The API key that should be used to access the API. You can get an API key at https://beta.openai.com/overview.prompt
- The text that the AI should respond to. An example is "Write a tagline for an ice cream shop.". Also see this guide: https://beta.openai.com/docs/guides/completion.engine
- The engine that should be used to process the prompt. Defaults to "text-davinci-001"
if not specified. You can find a list of engines is available here: https://beta.openai.com/docs/engines.options
- An object that contains additional options for the request. You can find the documentation for these options here: https://beta.openai.com/docs/api-reference/completions/create.It returns a promise that contains a list of generated choices.
Example:
let oai = getBot('system', 'oai-1.manager');
const response = await oai.generateTextResponse({
apiKey: 'myAPIKey',
prompt: 'Write a tagline for an ice cream shop.',
});
if (response.choices.length > 0) {
os.toast('Best choice: ' + response.choices[0]);
} else {
os.toast('No choices.');
}
os.listData()
where it was impossible to list data items unless a starting address was provided.