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

added Node example to the /user-guide/apps/intro page #55

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

harishkotra
Copy link
Collaborator

Added an additional example using node in the OpenAI ecosystem apps page.

This example addition demonstrates how to set up and use the OpenAI API with a custom base URL, enabling integration with alternative AI providers or private deployments in a Node.js project.

Copy link
Contributor

juntao commented Aug 28, 2024

Hello, I am a PR summary agent on flows.network. Here are my reviews of code commits in this PR.


Commit b3a612aa63b3f879dc742e5b8d929666b4ec27ac

Key changes:

  1. The OpenAI Node API library has been added as a guide for JavaScript/TypeScript developers.
  2. It provides a convenient way to access the OpenAI REST API, with installation instructions and code examples given.
  3. Users are instructed to create an OpenAI client with a custom base URL that points to their Gaia node's address, which should have /v1 appended after the host name.
  4. The API key is not necessary when using Gaia, so it can be left empty.
  5. A new function, callOpenAI(), has been introduced as an example of how to make API calls from the client, with a specific model ("Meta-Llama-3-8B-Instruct-Q5_K_M") being used in this case.

@harishkotra
Copy link
Collaborator Author

@alabulei1 for your review. Thank you.

@alabulei1 alabulei1 merged commit efcec05 into GaiaNet-AI:main Aug 29, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants