Skip to content

Commit 0fa8bc4

Browse files
committedJan 15, 2025·
Add modifyThread function
1 parent d74ff9f commit 0fa8bc4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
 

‎openai-api-servant/src/OpenAI/Api.hs

+4
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ type ThreadsApi =
148148
OpenAIAuth :> AzureAPIVer
149149
:> ReqBody '[JSON] ThreadCreate
150150
:> Post '[JSON] Thread
151+
:<|> OpenAIAuth :> AzureAPIVer
152+
:> Capture "thread_id" ThreadId
153+
:> ReqBody '[JSON] ThreadCreate
154+
:> Post '[JSON] Thread
151155
:<|> OpenAIAuth :> "runs"
152156
:> AzureAPIVer
153157
:> ReqBody '[JSON] ThreadAndRunCreate

‎openai-api/src/OpenAI/Client.hs

+3
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ module OpenAI.Client
123123
ThreadCreate(..),
124124
ThreadId(..),
125125
createThread,
126+
modifyThread,
126127
deleteThread,
127128

128129
-- * Messages (BETA)
@@ -341,6 +342,7 @@ EP5 (listAssistants, Maybe String, Maybe Int, Maybe Order, Maybe AssistantId, Ma
341342
EP2 (deleteAssistant, Maybe String, AssistantId, DeleteConfirmation)
342343

343344
EP2 (createThread, Maybe String, ThreadCreate, Thread)
345+
EP3 (modifyThread, Maybe String, ThreadId, ThreadCreate, Thread)
344346
EP2 (deleteThread, Maybe String, ThreadId, DeleteConfirmation)
345347

346348
EP6 (getMessages, Maybe String, ThreadId, Maybe Int, Maybe Order, Maybe MessageId, Maybe MessageId, (OpenAIList Message))
@@ -387,6 +389,7 @@ completeChatStreaming' :: Token -> ChatCompletionRequest -> Maybe String -> Clie
387389
:<|> deleteAssistant'
388390
)
389391
:<|> ( createThread'
392+
:<|> modifyThread'
390393
:<|> createThreadAndRun'
391394
:<|> getRun'
392395
:<|> submitToolOutputs'

0 commit comments

Comments
 (0)