{"id":14066028,"url":"https://github.com/elkronos/openai_api","last_synced_at":"2025-04-09T17:32:13.522Z","repository":{"id":167414004,"uuid":"643026770","full_name":"elkronos/openai_api","owner":"elkronos","description":"Interact with openai APIs (DALLE2, GPT, Whisper)","archived":false,"fork":false,"pushed_at":"2025-03-14T00:32:19.000Z","size":133,"stargazers_count":14,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T19:39:09.620Z","etag":null,"topics":["api","gpt","large-language-models","llm","openai","openai-api","python","r","sentiment-analysis"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elkronos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-19T22:50:24.000Z","updated_at":"2025-03-14T00:32:22.000Z","dependencies_parsed_at":"2024-05-02T07:31:46.032Z","dependency_job_id":"039cdf89-0b24-40e2-a5e8-14505ad2ff77","html_url":"https://github.com/elkronos/openai_api","commit_stats":null,"previous_names":["elkronos/openai_api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkronos%2Fopenai_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkronos%2Fopenai_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkronos%2Fopenai_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elkronos%2Fopenai_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elkronos","download_url":"https://codeload.github.com/elkronos/openai_api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248077465,"owners_count":21043970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","gpt","large-language-models","llm","openai","openai-api","python","r","sentiment-analysis"],"created_at":"2024-08-13T07:04:54.339Z","updated_at":"2025-04-09T17:32:13.178Z","avatar_url":"https://github.com/elkronos.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# openai_api\nInteract with openai APIs using (DALLE2, GPT, Whisper). The code base is primairly in R, but refactored scripts are being developed and tested. For best results, use GPT 4.\n\n## Scripts\n\nBelow is a summary of each directory. Please see specific scripts for detailed roxygen about their uses with examples.\n\n### 01 - api_base - Basic API connectivity.\n* `dalle_api.R` - Sends prompt to generate and download images from DALLE.\n* `fine_tune_model.R` -  Function to fine-tune a GPT model using the OpenAI API.\n* `gpt_api.R` - Sends a prompt to GPT via the OpenAI API and returns the generated text.\n* `gpt_contextual_api.R` - Sends a prompt to GPT via the API; and affords the ability to manage the context of a conversation and keep multiple sessions.\n* `whisper_api.R` - Transcribes audio files.\n\n### 02 - assistants - Scripts designed to assist in completeing specific tasks.\n* `gpt_audioquery.R` - Record audio for a given duration, transcribe it using the Whisper API, and send the transcription to the GPT.\n* `gpt_dateparse.R` - Parse dates with GPT.\n* `gpt_classifier.R` - Classifies the type of data in each column in a dataset.\n* `gpt_finetune.R` - Wrapper function for fine-tuning models using your own documents. Provides functions to upload documents, check status, and cancel jobs.\n* `gpt_gridsearch.R` - Performs a grid search over the specified GPT models and parameters, using a given prompt.\n* `gpt_nlp.R` - Function that allows the user to convert text into root words, label the part of speech (noun, verb, adverb, etc), or analyze the sentiment of text (-1, 0, 1).\n* `gpt_persona.R` - Illustrates how to vary system messages (change roles/personas) across a dataset to generate multiple responses.\n* `gpt_random_number_experiment.R` - Based on the `gpt_gridsearch.R` assistant, allows use to vary prompts, temperature, system messages, and add context. Designed to perform an experiment whereby GPT picks random numbers between 0 - 10.\n* `gpt_read.R` -  Reads a list of text chunks and a question, and uses the GPT model to generate a response based on the text.\n* `gpt_sentiment.R` - Conducts sentiment analysis on a given dataframe using the GPT.\n\n### 03 - dashboards - Interactive dashboards integrated with an OpenAI API.\n* `gpt_sentiment_assistant.R` - Use GPT to analyze sentiment via a Shiny dashboard. Populates barplot and searchable table.\n\n### 04 - refactored - Scripts refactored into other languages.\n\nSee a table of scripts and refactored languages below.\n\n| Package Name   | Description                                                  | Python      | Ruby        |\n|----------------|--------------------------------------------------------------|-------------|-------------|\n| gpt_api        | Call the GPT API.                     | \u0026#x2713;    | \u0026#x2713;    |\n| gpt_contextual_api        | Call the GPT API.                     |        | \u0026#x2713;    |\n| gpt_classifier | Classify/label data using GPT.        | \u0026#x2713;    |             |\n| gpt_dateparser | Parse dates using GPT.      | \u0026#x2713;    | \u0026#x2713;    |\n| gpt_read       | Read documents and ask questions. | \u0026#x2713; |             |\n| gpt_sentiment  | Code sentiment of text using GPT.     | \u0026#x2713;    | \u0026#x2713;    |\n| whisper_api    | Translate or transcribe audio using GPT. | \u0026#x2713; |             |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felkronos%2Fopenai_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felkronos%2Fopenai_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felkronos%2Fopenai_api/lists"}