Coder Social home page Coder Social logo

azure / openai-samples Goto Github PK

View Code? Open in Web Editor NEW
380.0 14.0 112.0 83.01 MB

Samples for working with Azure OpenAI Service

Home Page: https://aka.ms/azure-openai

License: Other

Jupyter Notebook 81.07% Python 16.87% HTML 0.98% C# 0.93% CSS 0.14% JavaScript 0.02%

openai-samples's Introduction

ℹī¸ This repository has been migrated to a new location. Click to redirect.

openai-samples's People

Contributors

arb-ms-git avatar dependabot[bot] avatar dereklegenzoff avatar gojira avatar microsoft-github-operations[bot] avatar microsoftopensource avatar nawanas avatar paragag11 avatar paragagrawal11 avatar riyabaliyan123 avatar shshubhe avatar sshanu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openai-samples's Issues

Capitalize service in README.MD H1

image

Official name of the service is: "Azure OpenAI Service". On first use full name is required in Microsoft content, on subsequent uses Azure OpenAI without "Service" is allowed.

Deployment steps

Is there a script where all the service are getting deployed on Azure and we can test the app.

Tried setting up each service separately and run the solution locally but no luck

Sample Terraform Scripts for OpenAI Services

Hi,

These samples are great, however they assume you have manually setup OpenAI services in Azure, would it be possible to provide a sample Terraform script to build the infrastructure?

Thank you,
Peter

Invalid Request Error: Resource not found

Hi,

I'm facing an issue, I'm able to use in Python the code from the Azure OpenAI sandbox, so my keys and rest of configuration is ok, but when I try to use your samples I got a Invalid Request Error: Resource not found,

this is the trace:

InvalidRequestError Traceback (most recent call last)
Cell In[121], line 3
1 max_response_tokens = 500
----> 3 response = send_message(messages, chatgpt_model_name, max_response_tokens)
4 messages.append({"role": "assistant", "content": response})
6 print_conversation(messages)

Cell In[117], line 4, in send_message(messages, model_name, max_response_tokens)
3 def send_message(messages, model_name, max_response_tokens=500):
----> 4 response = openai.ChatCompletion.create(
5 engine=chatgpt_model_name,
6 messages=messages,
7 temperature=0.5,
8 max_tokens=max_response_tokens,
9 top_p=0.9,
10 frequency_penalty=0,
11 presence_penalty=0,
12 )
13 return response['choices'][0]['message']['content']

File /opt/homebrew/lib/python3.10/site-packages/openai/api_resources/chat_completion.py:25, in ChatCompletion.create(cls, *args, **kwargs)
23 while True:
24 try:
---> 25 return super().create(*args, **kwargs)
...
684 rbody, rcode, resp.data, rheaders, stream_error=stream_error
685 )
686 return resp

InvalidRequestError: Resource not found

Regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.