Skip to content

Conversation

@arey
Copy link
Contributor

@arey arey commented Oct 29, 2024

Change

While using the OpenAI demo API key as described in the documentation here, I encountered two unexpected errors. Consequently, I've updated the documentation.

dev.ai4j.openai4j.OpenAiHttpException: Maximum number of tokens per request for demonstration purposes is 5000. If you wish to use more, please use your own OpenAI API key.

dev.ai4j.openai4j.OpenAiHttpException: Only gpt-4o-mini model is available for demonstration purposes. If you wish to use another model, please use your own OpenAI API key.

General checklist

  • There are no breaking changes
  • I have added unit and integration tests for my change
  • I have manually run all the unit and integration tests in the module I have added/changed, and they are all green
  • I have manually run all the unit and integration tests in the core and main modules, and they are all green

Checklist for adding new maven module

  • I have added my new module in the root pom.xml and langchain4j-bom/pom.xml

Checklist for adding new embedding store integration

  • I have added a {NameOfIntegration}EmbeddingStoreIT that extends from either EmbeddingStoreIT or EmbeddingStoreWithFilteringIT
  • I have added a {NameOfIntegration}EmbeddingStoreRemovalIT that extends from EmbeddingStoreWithRemovalIT

Checklist for changing existing embedding store integration

  • I have manually verified that the {NameOfIntegration}EmbeddingStore works correctly with the data persisted using the latest released version of LangChain4j

@langchain4j
Copy link
Collaborator

@arey thank you!

I did not document quotas on purpose to not "advertise" free tokens.
But perharps we could indeed explicitly mention model name

@arey
Copy link
Contributor Author

arey commented Oct 29, 2024

Ok @langchain4j , I'm understanding. I've just removed quota details.

Copy link
Collaborator

@langchain4j langchain4j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arey thank you!

@langchain4j langchain4j merged commit d0fe74b into langchain4j:main Oct 29, 2024
jinsihou19 pushed a commit to jinsihou19/langchain4j that referenced this pull request May 12, 2025
…gchain4j#2000)

## Change

While using the OpenAI demo API key as described in the documentation
[here](https://docs.langchain4j.dev/integrations/language-models/open-ai),
I encountered two unexpected errors. Consequently, I've updated the
documentation.

> dev.ai4j.openai4j.OpenAiHttpException: Maximum number of tokens per
request for demonstration purposes is 5000. If you wish to use more,
please use your own OpenAI API key.

> dev.ai4j.openai4j.OpenAiHttpException: Only gpt-4o-mini model is
available for demonstration purposes. If you wish to use another model,
please use your own OpenAI API key.

## General checklist
- [X] There are no breaking changes
- [ ] I have added unit and integration tests for my change
- [ ] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [ ] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ X] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)


## Checklist for adding new maven module
- [ ] I have added my new module in the root `pom.xml` and
`langchain4j-bom/pom.xml`

## Checklist for adding new embedding store integration
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreIT` that extends
from either `EmbeddingStoreIT` or `EmbeddingStoreWithFilteringIT`
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreRemovalIT` that
extends from `EmbeddingStoreWithRemovalIT`

## Checklist for changing existing embedding store integration
- [ ] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j
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.

2 participants