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

[Feature]: A simple UI for developer testing API #53

Closed
7 tasks done
Aisuko opened this issue Aug 15, 2024 · 21 comments · Fixed by #84 or #85
Closed
7 tasks done

[Feature]: A simple UI for developer testing API #53

Aisuko opened this issue Aug 15, 2024 · 21 comments · Fixed by #84 or #85
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed javascript

Comments

@Aisuko
Copy link
Contributor

Aisuko commented Aug 15, 2024

Contact Details(optional)

No response

What feature are you requesting?

Please add a simple_ui https://github.com/Aisuko/chatpilot/blob/main/demo_ui.py to our project under example folder. It aims for new contributor easier to do contribution. The demo_ui I mentioned above also support to invoke our project chat API, this is the next step.

Free to change the content on the demo_ui.py file.

No need to rush time. This is a good chance to familiar the code.

@Aisuko Aisuko added enhancement New feature or request javascript good first issue Good for newcomers help wanted Extra attention is needed labels Aug 15, 2024
@knframe2
Copy link

.

@ZooHigher26
Copy link
Collaborator

Happy to do "Replace the Customary xxxxxx: chatbot to your project name" or any other task/s.

@Aisuko
Copy link
Contributor Author

Aisuko commented Aug 25, 2024

@ZooHigher26 You can add https://github.com/Aisuko/chatpilot/blob/main/demo_ui.py to this project. And do a PR for it. And then replace the name on it and do another PR.

@ZooHigher26
Copy link
Collaborator

Do I just add demo_ui.py or do I need to add all the files as well?

@Aisuko
Copy link
Contributor Author

Aisuko commented Aug 25, 2024

Do I just add demo_ui.py or do I need to add all the files as well?

Only add single file demo_ui.py

@Aisuko
Copy link
Contributor Author

Aisuko commented Aug 28, 2024

@ZYLIII

def setUpClass(cls):
cls.api_key = "API_KEY"
cls.base_url="http://127.0.0.1:8000"
cls.base_url_openai = "http://127.0.0.1:8000/v1"
cls.client= openai.OpenAI(
api_key=cls.api_key, base_url=cls.base_url_openai)
@classmethod
def tearDownClass(cls):
pass
def test_health(self):
res=requests.get(url=self.base_url+"/healthy")
self.assertEqual(res.status_code, 200)
def test_inference_by_openai(self):
completion=self.client.chat.completions.create(
model="",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What should I do today?"},
],
max_tokens=16,
stop=["\n### user:"],
stream=False
)
# length of message should more than 0
self.assertTrue(len(completion.choices)>0)
print(completion.choices[0].message)

@Aisuko
Copy link
Contributor Author

Aisuko commented Aug 28, 2024

Replace the image

  • Upload specific log to example/img
  • Replace path of image

st.image('img/RMIT_POS3.png', use_column_width=True)

@ZooHigher26
Copy link
Collaborator

Can I still do any tasks that haven't been assigned?

@Aisuko
Copy link
Contributor Author

Aisuko commented Aug 31, 2024

Can I still do any tasks that haven't been assigned?

Yes, totally welcome. Let me invite you as a collaborator of the SkywardAI Org.

Please check your Email box or Github Home page. I believe you will see the invitation.

Screenshot 2024-08-31 at 12 03 20 PM

@Aisuko
Copy link
Contributor Author

Aisuko commented Aug 31, 2024

@cbh778899 May you create some issues of the update events pages? Please split the tasks into small chunk that will easier for our new collaborators to do contribution.

@cbh778899
Copy link
Collaborator

That's different, not belongs to this project...

@Aisuko
Copy link
Contributor Author

Aisuko commented Aug 31, 2024

You are right. May you create new issues that follow the roadmap?

@ZooHigher26
Copy link
Collaborator

I'm not sure how to remove the older commits, will this be an issue?

@cbh778899
Copy link
Collaborator

I'm not sure how to remove the older commits, will this be an issue?

The next time please pull the latest main branch, start a new branch from main or rebase the main branch to your working branch, that can avoid having strange history commits. This should be fine for now.

@ZooHigher26
Copy link
Collaborator

@Aisuko I created a new branch and updated the files but it's still showing the previous commit history.
image
image
Would it be easier to delete the fork, fork the repo again and then make the necessary changes?

@Aisuko
Copy link
Contributor Author

Aisuko commented Sep 1, 2024

Hi @ZooHigher26, yes, feel free to do it. And also, I believe you have "write" permission of voyager which means you can clone this repo directly, and push a new branch. And the new branch can be create a PR.

@ZooHigher26 ZooHigher26 mentioned this issue Sep 2, 2024
1 task
@ZooHigher26
Copy link
Collaborator

@Aisuko I think I managed to fix the issues with the commit history, but not 100% sure if it was the right way to do it. I just created a new branch named UI features and then created a pull request from that.

@Aisuko
Copy link
Contributor Author

Aisuko commented Sep 4, 2024

@s3861232
Copy link
Contributor

s3861232 commented Sep 4, 2024

This is Paveenuch

@Murkeee
Copy link
Contributor

Murkeee commented Sep 7, 2024

@s3861232 let us know if you need help with your task :)

@s3861232
Copy link
Contributor

s3861232 commented Sep 7, 2024

@Murkeee Thank you so much. Appreciate it. I should be able to work on it tonight. Just came back from holiday ^^

s3861232 added a commit to s3861232/voyager that referenced this issue Sep 16, 2024
s3861232 added a commit to s3861232/voyager that referenced this issue Sep 16, 2024
Aisuko pushed a commit that referenced this issue Sep 18, 2024
* Update README.md for #53

* create launch.json to the project

* update documentation for #53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed javascript
Projects
Status: Done
6 participants