Skip to content

davesarmoury/openai_ros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openai_ros

ROS1 wrapper for (OpenAI Python Library)[https://pypi.org/project/openai/].

How to start program

Start from sample lamuch file

$ export OPENAI_API_KEY="xxxxxxxxx"
$ roslaunch openai_ros openai.launch max_tokens:=256 model:=text-davinch-003

or put following code within your launch file.

  <group ns="openai">
    <node pkg="openai_ros" type="openai_node.py" name="openai" output="screen">
      <rosparam command="load" file="openai_credentials.json" />
    </node>
  </group>

The contents of openai_credentials.json file is something like

key: xxxxxxxxx
max_tokens: 256
model: text-davinci-003

How to use service

$ rosservice call /openai/get_response '{prompt: "Write a poem about OpenAI"}'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published