Skip to content

Commit eb8ca84

Browse files
committed
chore: omit not relevant apis
1 parent 2ffa191 commit eb8ca84

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

README.md

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -119,49 +119,10 @@ async def main():
119119

120120

121121
asyncio.run(main())
122-
123122
```
124123

125124
A more detailed example can be found [here](examples/studio/chat/chat_completions.py).
126125

127-
### Chat
128-
129-
```python
130-
from ai21 import AI21Client
131-
from ai21.models import RoleType
132-
from ai21.models import ChatMessage
133-
134-
system = "You're a support engineer in a SaaS company"
135-
messages = [
136-
ChatMessage(text="Hello, I need help with a signup process.", role=RoleType.USER),
137-
ChatMessage(text="Hi Alice, I can help you with that. What seems to be the problem?", role=RoleType.ASSISTANT),
138-
ChatMessage(text="I am having trouble signing up for your product with my Google account.", role=RoleType.USER),
139-
]
140-
141-
142-
client = AI21Client()
143-
chat_response = client.chat.create(
144-
system=system,
145-
messages=messages,
146-
model="j2-ultra",
147-
)
148-
```
149-
150-
For a more detailed example, see the chat [examples](examples/studio/chat.py).
151-
152-
### Completion
153-
154-
```python
155-
from ai21 import AI21Client
156-
157-
158-
client = AI21Client()
159-
completion_response = client.completion.create(
160-
prompt="This is a test prompt",
161-
model="j2-mid",
162-
)
163-
```
164-
165126
### Chat Completion
166127

167128
```python

0 commit comments

Comments
 (0)