Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Mar 5, 2024
1 parent 59dca7a commit 63ce62c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,16 @@ chatbot.registerExtension({
Here is an example of a simple extension that can be used to control a microscope.

```python
from pydantic import BaseModel
from pydantic import BaseModel, Field
from imjoy_rpc import api

class MoveStageInput(BaseModel):
"""Move the microscope stage"""
x: float = Field(..., description="x offset")
y: float = Field(..., description="y offset")

class SnapImageInput(BaseModel):
"""Move the microscope stage"""
exposure: float = Field(..., description="exposure time")

def move_stage(kwargs):
Expand Down Expand Up @@ -84,4 +86,4 @@ async def setup():
await chatbot.registerExtension(extension)

api.export({"setup": setup})
```
```

0 comments on commit 63ce62c

Please sign in to comment.