Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register bindings for new device interfaces #3003

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

PeterBowman
Copy link
Member

Follow-up of #2978 and #2993. Successfully tested on Python and the corresponding fake device implementations. Incidentally, the new headers have been also added to <yarp/dev/all.h>.

Sample usage:

import yarp

options = yarp.Property()
options.put('device', 'fakeLLMDevice')

dd = yarp.PolyDriver(options)
llm = dd.viewILLM()

llm.setPrompt('test')

vs = yarp.SVector(1)
vsp = yarp.SPairVector()

llm.readPrompt(vs) # `vs[0]` yields 'test'
llm.ask('blah blah blah', vs)

llm.getConversation(vsp)
# `vsp[0]` yields ('system', 'test')
# `vsp[1]` yields ('user', 'blah blah blah')
# `vsp[2]` yields ('assistant', 'Fatti non foste per viver come bruti ma per seguir virtute e canoscenza')

llm.deleteConversation()

- yarp::dev::ISpeechSynthesizer
- yarp::dev::ISpeechTranscription
- yarp::dev::ILLM
@update-docs
Copy link

update-docs bot commented Aug 12, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update the release notes by adding a file in doc/release/<target_branch>, based on your changes.

@PeterBowman PeterBowman temporarily deployed to code-analysis August 12, 2023 11:23 — with GitHub Actions Inactive
@randaz81 randaz81 added this to the YARP 3.9.0 milestone Aug 16, 2023
@randaz81 randaz81 self-assigned this Aug 16, 2023
@randaz81 randaz81 added the Component: Bindings swig, python, java, ruby, perl, octave, matlab, lua, csharp, tcl label Aug 16, 2023
@randaz81 randaz81 merged commit 54d9804 into robotology:master Aug 16, 2023
46 of 50 checks passed
@PeterBowman PeterBowman deleted the speech-llm-bindings branch August 16, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Bindings swig, python, java, ruby, perl, octave, matlab, lua, csharp, tcl
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants