Skip to content

docs: wrap README chat.send example in chatRequest - #1182

Draft
LukasParke wants to merge 1 commit into
mainfrom
devin/1791237863-readme-chatrequest
Draft

LukasParke wants to merge 1 commit into
mainfrom
devin/1791237863-readme-chatrequest

Conversation

@LukasParke

Copy link
Copy Markdown
Contributor

Summary

Fixes #852 and #413. The README's SDK Usage example passed messages, model, and the other fields directly to chat.send(). chat.send() takes SendChatCompletionRequestRequest, which requires { chatRequest: ChatRequest }, so the copy-pasted quickstart fails validation. This PR wraps the fields in chatRequest. That README section is hand-written (<!-- No SDK Example Usage [usage] -->), so regeneration keeps the edit.

await openRouter.chat.send({ chatRequest: { messages, model, provider, stream: true } });

Searched existing PRs; none matched.

Link to Devin session: https://openrouter.devinenterprise.com/sessions/78072f08dc274fda9d8309045b1ab806
Open in Devin Desktop: https://openrouter.devinenterprise.com/desktop/session/78072f08dc274fda9d8309045b1ab806?variant=devin
Requested by: @LukasParke

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

Original prompt from Luke

SYSTEM:
<latest_message>
Luke Parke (U0BF2BKT52N) [ts=1791235775.813579]: @Devin audit all open issues on our public Typescript, Python, and Go SDKs, and the terraform Provider repo, and list out the unique problems, and vet them to determine validity and severity
</latest_message>

=== BEGIN THREAD HISTORY (in #agents) ===
Luke Parke (U0BF2BKT52N) [ts=1791235775.813579]: @Devin audit all open issues on our public Typescript, Python, and Go SDKs, and the terraform Provider repo, and list out the unique problems, and vet them to determine validity and severity
=== END THREAD HISTORY ===
Channel ID: C07UF9XLTFF
Thread URL: https://openrouter.slack.com/archives/C07UF9XLTFF/p1791235775813579?thread_ts=1791235775.813579&amp;cid=C07UF9XLTFF

The <latest_message> is the message that you should use to guide your goals + task for this session, and you should use the rest of the slack thread as context.
A [ts=...] marker on a Slack message is that message's timestamp. To act on a specific message with the slack tool (e.g. adding an emoji reaction via the reaction command), pass that value as timestamp along with the Channel ID — no extra lookup call is needed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README quickstart examples pass model/messages directly instead of the chatRequest wrapper

1 participant